mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 21:20:06 +00:00
Fix comparators on drains crashing if the smeltery is invalid (or there is none) #1342
This commit is contained in:
1 parent
d17ca72edd
commit
2d81be02d3
1 file changed
+3
@@ -186,6 +186,9 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
|
||||
public int comparatorStrength ()
|
||||
{
|
||||
CoordTuple master = this.getMasterPosition();
|
||||
// invalid smeltery
|
||||
if(master == null)
|
||||
return 0;
|
||||
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(master.x, master.y, master.z);
|
||||
return 15 * smeltery.currentLiquid / smeltery.maxLiquid;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user