aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0926-Fix-inventory-desync.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0926-Fix-inventory-desync.patch')
-rw-r--r--patches/server/0926-Fix-inventory-desync.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/patches/server/0926-Fix-inventory-desync.patch b/patches/server/0926-Fix-inventory-desync.patch
index 4345fa9aa5..f69c4d7ee9 100644
--- a/patches/server/0926-Fix-inventory-desync.patch
+++ b/patches/server/0926-Fix-inventory-desync.patch
@@ -4,6 +4,18 @@ Date: Wed, 23 Aug 2023 13:22:09 -0700
Subject: [PATCH] Fix inventory desync
+diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
+index d1833dcc92b1570e62a1941bbea6d66ff0b2ee5f..5da7ffee71bf6d82a53b3c2f99e2bd898d0b1799 100644
+--- a/src/main/java/net/minecraft/world/entity/Mob.java
++++ b/src/main/java/net/minecraft/world/entity/Mob.java
+@@ -1336,6 +1336,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
+ // CraftBukkit start - fire PlayerLeashEntityEvent
+ if (CraftEventFactory.callPlayerLeashEntityEvent(this, player, player, hand).isCancelled()) {
+ ((ServerPlayer) player).connection.send(new ClientboundSetEntityLinkPacket(this, this.getLeashHolder()));
++ player.containerMenu.sendAllDataToRemote(); // Paper - Fix inventory desync
+ return InteractionResult.PASS;
+ }
+ // CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java
index e258e5915b286f1117bc1413dfd3d2a5c4655380..8d2c0accadaf0c5d28e7db6e62a05f6c619cf02f 100644
--- a/src/main/java/net/minecraft/world/item/BlockItem.java