Fixed Pipes not connecting to tile entities whose blocks don't extend BlockContainer

This commit is contained in:
Xfel 2012-09-18 21:38:56 +03:00
parent 0479fab15d
commit 09d522be58

View file

@ -36,7 +36,9 @@ public class TileBuffer {
tile = null;
blockID = world.getBlockId(this.x, this.y, this.z);
if (Block.blocksList[blockID] instanceof BlockContainer)
Block block = Block.blocksList[blockID];
if (block != null
&& block.hasTileEntity(world.getBlockMetadata(this.x, this.y, this.z)))
tile = world.getBlockTileEntity(this.x, this.y, this.z);
}