Fixed some multipart crashes

This commit is contained in:
aidancbrady committed 2017-03-29 17:38:40 -04:00
1 parent 0baf510473
commit 3fccbada96
3 files changed
+15 -16

No files matched your search

@@ -135,11 +135,11 @@ public class BlockGlowPanel extends Block implements ITileEntityProvider
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos)
{
TileEntityGlowPanel tile = (TileEntityGlowPanel)world.getTileEntity(pos);
TileEntity tile = world.getTileEntity(pos);
if(tile != null)
if(tile != null && tile instanceof TileEntityGlowPanel)
{
return bounds[tile.side.ordinal()];
return bounds[((TileEntityGlowPanel)tile).side.ordinal()];
}
return super.getBoundingBox(state, world, pos);