From b4c0657d8bcbb1e43ce11ec63254b7a33bb8c22f Mon Sep 17 00:00:00 2001 From: nphhpn <55556233+nphhpn@users.noreply.github.com> Date: Wed, 3 Aug 2022 14:32:09 +0700 Subject: [PATCH] Fix #2539 --- .../contraptions/fluids/actors/HosePulleyFluidHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyFluidHandler.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyFluidHandler.java index 3d86cc3a6..063a52eae 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyFluidHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyFluidHandler.java @@ -25,12 +25,14 @@ public class HosePulleyFluidHandler implements IFluidHandler { int diff = resource.getAmount(); int totalAmountAfterFill = diff + internalTank.getFluidAmount(); FluidStack remaining = resource.copy(); + boolean deposited = false; if (predicate.get() && totalAmountAfterFill >= 1000) { if (filler.tryDeposit(resource.getFluid(), rootPosGetter.get(), action.simulate())) { drainer.counterpartActed(); remaining.shrink(1000); diff -= 1000; + deposited = true; } } @@ -41,7 +43,7 @@ public class HosePulleyFluidHandler implements IFluidHandler { return resource.getAmount(); } - return internalTank.fill(remaining, action); + return internalTank.fill(remaining, action) + (deposited ? 1000 : 0); } @Override