Fix comparator on drain crashing the game for invalid smelteries #1350

This commit is contained in:
Bernhard Bonigl committed 2015-01-18 19:47:40 +01:00
1 parent cd4206df72
commit f7525b68f6
1 file changed
+2
@@ -190,6 +190,8 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
if(master == null)
return 0;
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(master.x, master.y, master.z);
if(smeltery.maxLiquid == 0)
return 0;
return 15 * smeltery.currentLiquid / smeltery.maxLiquid;
}
}