Skip to content

Commit

Permalink
Fix #888
Browse files Browse the repository at this point in the history
Signed-off-by: Ross Allan <rallanpcl@gmail.com>
  • Loading branch information
LunNova committed Jul 12, 2013
1 parent b93e2c4 commit bc0ab9f
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -244,7 +244,10 @@ public void sendChunkUpdate() {
int z = chunkLocation.chunkZPos * 16 + (locationOfBlockChange[0] >> 8 & 15);
sendToAllPlayersWatchingChunk(new Packet53BlockChange(x, y, z, worldServer));

tilesToUpdate.add(chunk.getChunkBlockTileEntity(locationOfBlockChange[0] >> 12 & 15, locationOfBlockChange[0] & 255, locationOfBlockChange[0] >> 8 & 15));
TileEntity tileEntity = chunk.getChunkBlockTileEntity(locationOfBlockChange[0] >> 12 & 15, locationOfBlockChange[0] & 255, locationOfBlockChange[0] >> 8 & 15);
if (tileEntity != null) {
tilesToUpdate.add(tileEntity);
}
} else {
if (numberOfTilesToUpdate >= ForgeDummyContainer.clumpingThreshold) {
sendToAllPlayersWatchingChunk(new Packet51MapChunk(chunk, false, field_73260_f));
Expand All @@ -253,7 +256,10 @@ public void sendChunkUpdate() {
}

for (int i = 0; i < numberOfTilesToUpdate; ++i) {
tilesToUpdate.add(chunk.getChunkBlockTileEntity(locationOfBlockChange[i] >> 12 & 15, locationOfBlockChange[i] & 255, locationOfBlockChange[i] >> 8 & 15));
TileEntity tileEntity = chunk.getChunkBlockTileEntity(locationOfBlockChange[i] >> 12 & 15, locationOfBlockChange[i] & 255, locationOfBlockChange[i] >> 8 & 15);
if (tileEntity != null) {
tilesToUpdate.add(tileEntity);
}
}
}

Expand Down

0 comments on commit bc0ab9f

Please sign in to comment.