aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOwen1212055 <[email protected]>2021-04-22 05:23:57 -0400
committerGitHub <[email protected]>2021-04-22 11:23:57 +0200
commit3523f0fda99ab8bac5547ca0c49a6b4f564ff288 (patch)
treef200aa1314225e1cb7ce1c3155459b2e025eb754
parent6574d1aa824fe50d523d4f9b5f3f0ecc5e7760ad (diff)
downloadPaper-3523f0fda99ab8bac5547ca0c49a6b4f564ff288.tar.gz
Paper-3523f0fda99ab8bac5547ca0c49a6b4f564ff288.zip
Remove useless check on player interact cancellation (#5448)
This removes the BlockFlowerPot check that most likely was used when it was a tile entity.
-rw-r--r--Spigot-Server-Patches/0192-Extend-Player-Interact-cancellation.patch16
1 files changed, 2 insertions, 14 deletions
diff --git a/Spigot-Server-Patches/0192-Extend-Player-Interact-cancellation.patch b/Spigot-Server-Patches/0192-Extend-Player-Interact-cancellation.patch
index 8126ba4dc2..a0147364f6 100644
--- a/Spigot-Server-Patches/0192-Extend-Player-Interact-cancellation.patch
+++ b/Spigot-Server-Patches/0192-Extend-Player-Interact-cancellation.patch
@@ -13,7 +13,7 @@ Update adjacent blocks of doors, double plants, pistons and beds
when cancelling interaction.
diff --git a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
-index 51157a9223f3da22d1110cfa211a502de59fb8a1..cea19f4aafb3d81bf0dfcdac9103c03786fd5fc2 100644
+index 51157a9223f3da22d1110cfa211a502de59fb8a1..0ead8f1fabcc8debea8e2211d58a83b34acfcf0b 100644
--- a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
@@ -6,6 +6,7 @@ import net.minecraft.core.BlockPosition;
@@ -44,7 +44,7 @@ index 51157a9223f3da22d1110cfa211a502de59fb8a1..cea19f4aafb3d81bf0dfcdac9103c037
this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
// Update any tile entity data for this block
TileEntity tileentity = this.world.getTileEntity(blockposition);
-@@ -483,13 +490,32 @@ public class PlayerInteractManager {
+@@ -483,13 +490,20 @@ public class PlayerInteractManager {
interactItemStack = itemstack.cloneItemStack();
if (event.useInteractedBlock() == Event.Result.DENY) {
@@ -60,18 +60,6 @@ index 51157a9223f3da22d1110cfa211a502de59fb8a1..cea19f4aafb3d81bf0dfcdac9103c037
+ 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