mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 08:27:03 +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) {
|
||||
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 a new issue