This should fix #69, I couldn't recreate the crash so it needs to be tested.
This commit is contained in:
parent
566efca357
commit
6e4188fe62
|
@ -85,7 +85,16 @@ public class TileEntityIronChest extends TileEntityLockable implements ITickable
|
|||
|
||||
public IronChestType getType()
|
||||
{
|
||||
return this.hasWorldObj() ? this.worldObj.getBlockState(this.pos).getValue(BlockIronChest.VARIANT_PROP) : IronChestType.WOOD;
|
||||
IronChestType type = IronChestType.WOOD;
|
||||
if (this.hasWorldObj())
|
||||
{
|
||||
IBlockState state = this.worldObj.getBlockState(this.pos);
|
||||
if (state.getBlock() == IronChest.ironChestBlock)
|
||||
{
|
||||
type = state.getValue(BlockIronChest.VARIANT_PROP);
|
||||
}
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue