Fix a crash
This commit is contained in:
parent
1f2e792146
commit
c0c003a337
1 changed files with 6 additions and 1 deletions
|
@ -781,7 +781,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
|
||||
{
|
||||
TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getBlockTileEntity(x, y, z);
|
||||
ItemStack itemStack = new ItemStack(Mekanism.MachineBlock, 1, world.getBlockMetadata(x, y, z));
|
||||
ItemStack itemStack = new ItemStack(blockID, 1, world.getBlockMetadata(x, y, z));
|
||||
|
||||
if(((IUpgradeManagement)itemStack.getItem()).supportsUpgrades(itemStack))
|
||||
{
|
||||
|
@ -881,6 +881,11 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
|
||||
if(tileEntity instanceof IRedstoneControl)
|
||||
{
|
||||
if(itemStack.stackTagCompound == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
IRedstoneControl control = (IRedstoneControl)tileEntity;
|
||||
itemStack.stackTagCompound.setInteger("controlType", control.getControlType().ordinal());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue