Fix FluidTank with empty contents throwing error if drained (#6196)

This commit is contained in:
Ruben Taelman 2019-10-02 04:57:05 +02:00 committed by LexManos
parent 48ff897ed1
commit c985225d0c

View file

@ -190,7 +190,7 @@ public class FluidTank implements IFluidHandler, IFluidTank {
drained = fluid.getAmount();
}
FluidStack stack = new FluidStack(fluid, drained);
if (action.execute())
if (action.execute() && drained > 0)
{
fluid.shrink(drained);
}