Fix another crash

This commit is contained in:
Aidan C. Brady 2013-11-22 07:34:03 -05:00
parent ace1365d0f
commit df70da8bd0

View file

@ -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)