drain fluid containers also when the top side is configured for push or disabled

This commit is contained in:
Matthias Mann committed 2015-01-07 00:20:31 +01:00
1 parent 91a7b0ce81
commit 5087a371b0
1 file changed
+5 -2
@@ -123,7 +123,10 @@ public class TileTank extends AbstractMachineEntity implements IFluidHandler {
if(!canFill(from)) {
return 0;
}
return fillInternal(resource, doFill);
}
private int fillInternal(FluidStack resource, boolean doFill) {
int res = tank.fill(resource, doFill);
if(res > 0 && doFill) {
tankDirty = true;
@@ -329,11 +332,11 @@ public class TileTank extends AbstractMachineEntity implements IFluidHandler {
}
}
int filled = fill(ForgeDirection.UP, fluid, false);
int filled = fillInternal(fluid, false);
if(filled < fluid.amount) {
return false; //can't empty the entire thing
}
fill(ForgeDirection.UP, fluid, true);
fillInternal(fluid, true);
fillFrom = fillFrom.copy();
fillFrom.stackSize--;