Update tank below without using fill/drain method

This commit is contained in:
Fabian Maurer committed 2025-10-29 03:41:37 +01:00
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();
}
}
}