Fixed FluidUtil.tryEmptyFluidContainerItem not checking if the tank can accept fluids first. Closes #2527

This commit is contained in:
LexManos committed 2016-05-28 23:06:42 -07:00
1 parent b5f8da794c
commit aef721a248
1 file changed
+1 -1
@@ -367,7 +367,7 @@ public class FluidUtil
max = fluidContainer.getCapacity(container);
}
FluidStack drained = fluidContainer.drain(container, max, false);
if (drained != null)
if (drained != null && tank.canFill(side, drained.getFluid()))
{
// check how much we can fill into the tank
int filled = tank.fill(side, drained, false);