mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 15:23:41 +01:00
Scale hose pulley timer with server's infinite block threshold (#1752)
Thanks for the detailed writeup!
This commit is contained in:
parent
ec2a66357f
commit
18af709c9b
1 changed files with 10 additions and 3 deletions
|
@ -53,7 +53,6 @@ public abstract class FluidManipulationBehaviour extends TileEntityBehaviour {
|
||||||
List<BlockPosEntry> frontier;
|
List<BlockPosEntry> frontier;
|
||||||
Set<BlockPos> visited;
|
Set<BlockPos> visited;
|
||||||
|
|
||||||
static final int validationTimer = 160;
|
|
||||||
int revalidateIn;
|
int revalidateIn;
|
||||||
|
|
||||||
public FluidManipulationBehaviour(SmartTileEntity te) {
|
public FluidManipulationBehaviour(SmartTileEntity te) {
|
||||||
|
@ -68,12 +67,20 @@ public abstract class FluidManipulationBehaviour extends TileEntityBehaviour {
|
||||||
counterpartActed = true;
|
counterpartActed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int validationTimer() {
|
||||||
|
int maxBlocks = maxBlocks();
|
||||||
|
return infinite || maxBlocks < 0
|
||||||
|
? 160
|
||||||
|
// Allow enough time for the server's infinite block threshold to be reached
|
||||||
|
: maxBlocks / searchedPerTick;
|
||||||
|
}
|
||||||
|
|
||||||
protected int setValidationTimer() {
|
protected int setValidationTimer() {
|
||||||
return revalidateIn = validationTimer;
|
return revalidateIn = validationTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int setLongValidationTimer() {
|
protected int setLongValidationTimer() {
|
||||||
return revalidateIn = validationTimer * 2;
|
return revalidateIn = validationTimer() * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int maxRange() {
|
protected int maxRange() {
|
||||||
|
|
Loading…
Reference in a new issue