mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
Update tank below without using fill/drain method
This commit is contained in:
1 parent
f9c5b9bc41
commit
51219e1694
1 file changed
+6
-4
@@ -210,12 +210,14 @@ public class TileCertusQuartzTank extends TileEntity implements IFluidHandler {
|
||||
if (this.tank.getFluid() != null) {
|
||||
TileCertusQuartzTank below = getTankBelow(this);
|
||||
if (below != null) {
|
||||
FluidStack filled = this.tank.getFluid().copy();
|
||||
filled.amount = below.fill(this.tank.getFluid(), true, true);
|
||||
if (filled.amount >= 0) {
|
||||
this.drain(filled, true, true);
|
||||
FluidStack fluid = this.tank.getFluid().copy();
|
||||
int amount = below.tank.fill(fluid, true);
|
||||
if (amount > 0) {
|
||||
this.tank.drain(amount, true);
|
||||
this.hasUpdate = true;
|
||||
below.hasUpdate = true;
|
||||
this.compareAndUpdate();
|
||||
below.compareAndUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user