This should fix #69, I couldn't recreate the crash so it needs to be tested.

This commit is contained in:
alexbegt 2016-05-30 13:43:45 -04:00
parent 566efca357
commit 6e4188fe62
1 changed files with 10 additions and 1 deletions

View File

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