From e714de636543d61fcd3682705484c8a15f4f3ca6 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 21 Jun 2025 13:15:53 +0200 Subject: [PATCH] Fix excess slot updates By: AJ Ferguson --- .../minecraft/world/inventory/AbstractContainerMenu.java.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch index b705483ed..ba70c9588 100644 --- a/paper-server/patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch @@ -157,7 +157,7 @@ slot.setChanged(); + // CraftBukkit start - Make sure the client has the right slot contents -+ if (player instanceof ServerPlayer serverPlayer && slot.getMaxStackSize() != 64) { ++ if (player instanceof ServerPlayer serverPlayer && slot.getMaxStackSize() != Container.MAX_STACK) { + serverPlayer.connection.send(new net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket(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() == org.bukkit.event.inventory.InventoryType.WORKBENCH || this.getBukkitView().getType() == org.bukkit.event.inventory.InventoryType.CRAFTING) {