From c985225d0c1dd5479514b0ae573aad62016dd290 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Wed, 2 Oct 2019 04:57:05 +0200 Subject: [PATCH] Fix FluidTank with empty contents throwing error if drained (#6196) --- .../minecraftforge/fluids/capability/templates/FluidTank.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minecraftforge/fluids/capability/templates/FluidTank.java b/src/main/java/net/minecraftforge/fluids/capability/templates/FluidTank.java index 56405abf0..377a4f9da 100644 --- a/src/main/java/net/minecraftforge/fluids/capability/templates/FluidTank.java +++ b/src/main/java/net/minecraftforge/fluids/capability/templates/FluidTank.java @@ -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); }