From 54e11b8a4708b129c517239fe9d04756879ac2ca Mon Sep 17 00:00:00 2001 From: Ondra Moravek Date: Fri, 17 Oct 2014 23:54:17 +0200 Subject: [PATCH] Fix NPE for some (at least Mekanism) pipes connected to unfinished smeltery drains. --- .../java/tconstruct/smeltery/logic/SmelteryDrainLogic.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/tconstruct/smeltery/logic/SmelteryDrainLogic.java b/src/main/java/tconstruct/smeltery/logic/SmelteryDrainLogic.java index 7361f6f2..0c5d80c2 100644 --- a/src/main/java/tconstruct/smeltery/logic/SmelteryDrainLogic.java +++ b/src/main/java/tconstruct/smeltery/logic/SmelteryDrainLogic.java @@ -72,6 +72,9 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl { // Check that the drain is coming from the from the front of the block // and that the fluid to be drained is in the smeltery. + if(!hasValidMaster()) + return false; + boolean containsFluid = fluid == null; if (fluid != null) {