diff options
-rw-r--r-- | src/main/java/net/minecraft/server/ItemInWorldManager.java | 5 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/NetServerHandler.java | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ItemInWorldManager.java b/src/main/java/net/minecraft/server/ItemInWorldManager.java index 771c05f0..3baef72e 100644 --- a/src/main/java/net/minecraft/server/ItemInWorldManager.java +++ b/src/main/java/net/minecraft/server/ItemInWorldManager.java @@ -279,6 +279,11 @@ public class ItemInWorldManager { if (event.isCancelled()) { // Let the client know the block still exists ((EntityPlayer) this.player).netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, this.world)); + // Update any tile entity data for this block + TileEntity tileentity = this.world.getTileEntity(i, j, k); + if (tileentity != null) { + this.player.netServerHandler.sendPacket(tileentity.getUpdatePacket()); + } return false; } } diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 7f672c6c..c05c9c5f 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -542,8 +542,13 @@ public class NetServerHandler extends NetHandler { // CraftBukkit start if (i1 < this.server.getSpawnRadius() && !flag) { CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, i, j, k, l, this.player.inventory.getItemInHand()); - // CraftBukkit end this.player.netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, worldserver)); + // Update any tile entity data for this block + TileEntity tileentity = worldserver.getTileEntity(i, j, k); + if (tileentity != null) { + this.player.netServerHandler.sendPacket(tileentity.getUpdatePacket()); + } + // CraftBukkit end } else { this.player.itemInWorldManager.dig(i, j, k, packet14blockdig.face); } |