Remove useless check on player interact cancellation (#5448)

This removes the BlockFlowerPot check that most likely was used when it was a tile entity.
This commit is contained in:
Owen1212055 2021-04-22 05:23:57 -04:00
parent e4e3475ac3
commit fe208075ab

View file

@ -60,18 +60,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ entityplayer.playerConnection.sendPacket(new PacketPlayOutCloseWindow());
+ } else if (iblockdata.getBlock() instanceof BlockCommand) {
+ entityplayer.playerConnection.sendPacket(new PacketPlayOutCloseWindow());
+ } else if (iblockdata.getBlock() instanceof BlockFlowerPot) {
+ // Send a block change to air and then send back the correct block, just to make the client happy
+ PacketPlayOutBlockChange packet = new PacketPlayOutBlockChange(this.world, blockposition);
+ packet.block = Blocks.AIR.getBlockData();
+ this.player.playerConnection.sendPacket(packet);
+
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
+
+ TileEntity tileentity = this.world.getTileEntity(blockposition);
+ if (tileentity != null) {
+ player.playerConnection.sendPacket(tileentity.getUpdatePacket());
+ }
}
+ // Paper end - extend Player Interact cancellation
entityplayer.getBukkitEntity().updateInventory(); // SPIGOT-2867