mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Fixed FluidUtil.tryEmptyFluidContainerItem not checking if the tank can accept fluids first. Closes #2527
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user