From a4570215fd298683d8730b6d3cda000a1c5a059c Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Sun, 15 May 2011 22:54:13 -0400 Subject: [PATCH] Fixed TileEntity updates occurring upon a multi-block change. Thanks stoneLeaf! --- src/main/java/net/minecraft/server/PlayerInstance.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/minecraft/server/PlayerInstance.java b/src/main/java/net/minecraft/server/PlayerInstance.java index 1c980229c7..1f43e4b6ba 100644 --- a/src/main/java/net/minecraft/server/PlayerInstance.java +++ b/src/main/java/net/minecraft/server/PlayerInstance.java @@ -172,9 +172,11 @@ class PlayerInstance { this.sendAll(new Packet52MultiBlockChange(this.chunkX, this.chunkZ, this.dirtyBlocks, this.dirtyCount, this.playerManager.world)); for (i = 0; i < this.dirtyCount; ++i) { - j = this.chunkX * 16 + (this.dirtyCount >> 12 & 15); - k = this.dirtyCount & 255; - l = this.chunkZ * 16 + (this.dirtyCount >> 8 & 15); + // CraftBukkit start - Fixes TileEntity updates occurring upon a multi-block change; dirtyCount -> dirtyBlocks[i] + j = this.chunkX * 16 + (this.dirtyBlocks[i] >> 12 & 15); + k = this.dirtyBlocks[i] & 255; + l = this.chunkZ * 16 + (this.dirtyBlocks[i] >> 8 & 15); + // CraftBukkit end // CraftBukkit start if (Block.isTileEntity[this.playerManager.world.getTypeId(j, k, l)]) {