From df01cf867a2255024aacf9ac2ff6a56b2ffb7ce5 Mon Sep 17 00:00:00 2001 From: AJ Ferguson Date: Mon, 6 Jan 2025 20:31:00 +1100 Subject: [PATCH] #1529: Fix excess slot updates --- nms-patches/net/minecraft/world/inventory/Container.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nms-patches/net/minecraft/world/inventory/Container.patch b/nms-patches/net/minecraft/world/inventory/Container.patch index 808c39995..27fb20dd3 100644 --- a/nms-patches/net/minecraft/world/inventory/Container.patch +++ b/nms-patches/net/minecraft/world/inventory/Container.patch @@ -153,7 +153,7 @@ slot.setChanged(); + // CraftBukkit start - Make sure the client has the right slot contents -+ if (entityhuman instanceof EntityPlayer && slot.getMaxStackSize() != 64) { ++ if (entityhuman instanceof EntityPlayer && slot.getMaxStackSize() != IInventory.MAX_STACK) { + ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutSetSlot(this.containerId, this.incrementStateId(), slot.index, slot.getItem())); + // Updating a crafting inventory makes the client reset the result slot, have to send it again + if (this.getBukkitView().getType() == InventoryType.WORKBENCH || this.getBukkitView().getType() == InventoryType.CRAFTING) {