From 35f098e4b0ddc2861ed9557bff9e34b0d35ea4e3 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Tue, 21 Oct 2014 18:18:36 +0200 Subject: [PATCH] Fix smeltery overfilling if it was empty and one block could overfill it. (I'm looking at you there, compressed cobble) --- src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java b/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java index f3610bb1..b34295b8 100644 --- a/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java @@ -507,8 +507,12 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci needsUpdate = true; if (moltenMetal.size() == 0) { + // does it fit in? + if(liquid.amount > this.getCapacity()) + return false; + moltenMetal.add(liquid.copy()); - currentLiquid += liquid.amount; + updateCurrentLiquid(); return true; } else