mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-11 04:54:12 +01:00
fix tank flow priorities
This commit is contained in:
parent
7bdc017989
commit
7b64f06d79
@ -27,7 +27,7 @@ public class FluidTankTileEntity extends SmartTileEntity {
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ public class FluidTankTileEntity extends SmartTileEntity {
|
||||
private void updatePriority() {
|
||||
FluidTankTileEntity other = getOtherFluidTankTileEntity(Direction.DOWN);
|
||||
priority = 1000;
|
||||
if (other != null && other.getTank().getFluidAmount() < other.getTank().getCapacity()) {
|
||||
if (other != null) {
|
||||
priority = 0;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user