Fix another crash
This commit is contained in:
parent
ace1365d0f
commit
df70da8bd0
1 changed files with 4 additions and 1 deletions
|
@ -268,7 +268,10 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, IItem
|
||||||
|
|
||||||
if(tileEntity instanceof IRedstoneControl)
|
if(tileEntity instanceof IRedstoneControl)
|
||||||
{
|
{
|
||||||
((IRedstoneControl)tileEntity).setControlType(RedstoneControl.values()[stack.stackTagCompound.getInteger("controlType")]);
|
if(stack.stackTagCompound != null && stack.stackTagCompound.hasKey("controlType"))
|
||||||
|
{
|
||||||
|
((IRedstoneControl)tileEntity).setControlType(RedstoneControl.values()[stack.stackTagCompound.getInteger("controlType")]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tileEntity instanceof TileEntityFactory)
|
if(tileEntity instanceof TileEntityFactory)
|
||||||
|
|
Loading…
Reference in a new issue