mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-25 22:46:26 +01:00
fix tank flow priorities
This commit is contained in:
parent
7bdc017989
commit
7b64f06d79
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ public class FluidTankTileEntity extends SmartTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int calculateDrainAmount(FluidTankTileEntity other, int delta) {
|
private int calculateDrainAmount(FluidTankTileEntity other, int delta) {
|
||||||
boolean roundDirection = other.getPriority() > this.getPriority();
|
boolean roundDirection = other.getPriority() < this.getPriority();
|
||||||
return (int) Math.abs(roundDirection ? Math.floor(delta / 2f) : Math.ceil(delta / 2f));
|
return (int) Math.abs(roundDirection ? Math.floor(delta / 2f) : Math.ceil(delta / 2f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public class FluidTankTileEntity extends SmartTileEntity {
|
||||||
private void updatePriority() {
|
private void updatePriority() {
|
||||||
FluidTankTileEntity other = getOtherFluidTankTileEntity(Direction.DOWN);
|
FluidTankTileEntity other = getOtherFluidTankTileEntity(Direction.DOWN);
|
||||||
priority = 1000;
|
priority = 1000;
|
||||||
if (other != null && other.getTank().getFluidAmount() < other.getTank().getCapacity()) {
|
if (other != null) {
|
||||||
priority = 0;
|
priority = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue