From d45926a3929017cb47b979990e4db15f9dd5f709 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 26 Dec 2024 01:11:50 +1000 Subject: [PATCH] Fix #159 --- .../tconstruct/smeltery/block/entity/tank/SmelteryTank.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/slimeknights/tconstruct/smeltery/block/entity/tank/SmelteryTank.java b/src/main/java/slimeknights/tconstruct/smeltery/block/entity/tank/SmelteryTank.java index 0ba755f0b06..c006a7e3e58 100644 --- a/src/main/java/slimeknights/tconstruct/smeltery/block/entity/tank/SmelteryTank.java +++ b/src/main/java/slimeknights/tconstruct/smeltery/block/entity/tank/SmelteryTank.java @@ -358,7 +358,9 @@ public long extract(FluidVariant resource, long maxAmount, TransactionContext tr transaction.addOuterCloseCallback((result) -> { if (result.wasCommitted()) { if (fluid.getAmount() <= 0) { - SmelteryTank.this.fluids.remove(slot); + if (!SmelteryTank.this.fluids.isEmpty()) { + SmelteryTank.this.fluids.remove(slot); + } parent.notifyFluidsChanged(FluidChange.REMOVED, fluid); } else { parent.notifyFluidsChanged(FluidChange.CHANGED, fluid);