Fixed cap. bank crash when used with rotable blocks.

This commit is contained in:
CrazyPants committed 2014-07-25 21:10:41 +08:00
1 parent 15206c974c
commit 7556f56813
1 file changed
+8 -5
@@ -237,12 +237,15 @@ public class BlockCapacitorBank extends BlockEio implements IGuiHandler, IAdvanc
if(world.isRemote) {
return;
}
TileCapacitorBank tr = (TileCapacitorBank) world.getTileEntity(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
if(meta == 1) {
tr.setCreativeMode();
TileEntity te = world.getTileEntity(x, y, z);
if(te instanceof TileCapacitorBank) {
TileCapacitorBank tr = (TileCapacitorBank) te;
int meta = world.getBlockMetadata(x, y, z);
if(meta == 1) {
tr.setCreativeMode();
}
tr.onBlockAdded();
}
tr.onBlockAdded();
}
@Override