diff --git a/src/com/jaquadro/minecraft/storagedrawers/block/BlockDrawers.java b/src/com/jaquadro/minecraft/storagedrawers/block/BlockDrawers.java index fa1c813..ddf5aff 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/block/BlockDrawers.java +++ b/src/com/jaquadro/minecraft/storagedrawers/block/BlockDrawers.java @@ -342,7 +342,8 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH return false; } - if (side.ordinal() != getTileEntity(world, x, y, z).getDirection()) + if (getTileEntity(world, x, y, z) == null) return true; + if (side.ordinal() != getTileEntity(world, x, y, z).getDirection()) return true; return false; diff --git a/src/com/jaquadro/minecraft/storagedrawers/block/tile/TileEntityController.java b/src/com/jaquadro/minecraft/storagedrawers/block/tile/TileEntityController.java index 43b1387..32b17ae 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/block/tile/TileEntityController.java +++ b/src/com/jaquadro/minecraft/storagedrawers/block/tile/TileEntityController.java @@ -208,6 +208,7 @@ public class TileEntityController extends TileEntity implements IDrawerGroup, IS TileEntity te = worldObj.getTileEntity(x, y, z); if (te == null || !(te instanceof IDrawerGroup)) return; + if (depth > DEPTH_LIMIT) return; //if (te instanceof TileEntityController && depth < DEPTH_LIMIT) { // populateNeighborNodes(x, y, z, depth + 1);