From 70aace03129560549b84d7a6b3896308248311ef Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 10 Oct 2016 16:58:14 +1100 Subject: [PATCH] SPIGOT-2694: Update other half of door on BlockBreakEvent --- nms-patches/PlayerInteractManager.patch | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/nms-patches/PlayerInteractManager.patch b/nms-patches/PlayerInteractManager.patch index 4e7bdcbac8..dc3de5482f 100644 --- a/nms-patches/PlayerInteractManager.patch +++ b/nms-patches/PlayerInteractManager.patch @@ -123,7 +123,7 @@ } } -@@ -192,13 +251,76 @@ +@@ -192,13 +251,81 @@ } public boolean breakBlock(BlockPosition blockposition) { @@ -175,6 +175,11 @@ + } + // Let the client know the block still exists + ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition)); ++ // Send other half of the door ++ if (nmsBlock instanceof BlockDoor) { ++ boolean bottom = nmsData.get(BlockDoor.HALF) == BlockDoor.EnumDoorHalf.LOWER; ++ ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? blockposition.up() : blockposition.down())); ++ } + // Update any tile entity data for this block + TileEntity tileentity = this.world.getTileEntity(blockposition); + if (tileentity != null) { @@ -201,7 +206,7 @@ if ((block instanceof BlockCommand || block instanceof BlockStructure) && !this.player.dh()) { this.world.notify(blockposition, iblockdata, iblockdata, 3); return false; -@@ -243,6 +365,12 @@ +@@ -243,6 +370,12 @@ } } @@ -214,7 +219,7 @@ return flag; } } -@@ -283,7 +411,13 @@ +@@ -283,7 +416,13 @@ } } @@ -228,7 +233,7 @@ if (this.gamemode == EnumGamemode.SPECTATOR) { TileEntity tileentity = world.getTileEntity(blockposition); -@@ -340,6 +474,74 @@ +@@ -340,6 +479,74 @@ } } }