Added checks for is block loaded to several methods (#5533)

This commit is contained in:
Robert WC Seifert authored and Richard Freimer committed 2019-06-27 13:49:45 -04:00
1 parent d217a545ca
commit de705af546
16 files changed
+116 -71

No files matched your search

@@ -27,8 +27,8 @@ public class BlockBounding extends Block {
@Nullable
private static BlockPos getMainBlockPos(IBlockAccess world, BlockPos thisPos) {
TileEntity te = world.getTileEntity(thisPos);
if (te instanceof TileEntityBoundingBlock && !thisPos.equals(((TileEntityBoundingBlock) te).mainPos)) {
return ((TileEntityBoundingBlock) te).mainPos;
if (te instanceof TileEntityBoundingBlock && !thisPos.equals(((TileEntityBoundingBlock) te).getMainPos())) {
return ((TileEntityBoundingBlock) te).getMainPos();
}
return null;
}