Merge pull request #1782 from yueh/fix-1781
Fixes #1781: Do not crash after the tileentity was removed
This commit is contained in:
@@ -143,11 +143,9 @@ public abstract class PartSharedItemBus extends PartUpgradeable implements IGrid
|
|||||||
protected boolean canDoBusWork()
|
protected boolean canDoBusWork()
|
||||||
{
|
{
|
||||||
final TileEntity self = this.getHost().getTile();
|
final TileEntity self = this.getHost().getTile();
|
||||||
final TileEntity target = this.getTileEntity( self, self.xCoord + this.side.offsetX, self.yCoord + this.side.offsetY, self.zCoord + this.side.offsetZ );
|
final World world = self.getWorldObj();
|
||||||
|
final int xCoordinate = self.xCoord + this.side.offsetX;
|
||||||
final World world = target.getWorldObj();
|
final int zCoordinate = self.zCoord + this.side.offsetZ;
|
||||||
final int xCoordinate = target.xCoord;
|
|
||||||
final int zCoordinate = target.zCoord;
|
|
||||||
|
|
||||||
return world != null && world.getChunkProvider().chunkExists( xCoordinate >> 4, zCoordinate >> 4 );
|
return world != null && world.getChunkProvider().chunkExists( xCoordinate >> 4, zCoordinate >> 4 );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user