Skip to content

Commit 452bb31

Browse files
committed
1 parent 293e28a commit 452bb31

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

purpur-server/minecraft-patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@
88
// CraftBukkit start
99
public boolean checkReachable = true;
1010
public abstract org.bukkit.inventory.InventoryView getBukkitView();
11+
@@ -552,7 +_,7 @@
12+
13+
slot.setChanged();
14+
// CraftBukkit start - Make sure the client has the right slot contents
15+
- if (player instanceof ServerPlayer serverPlayer && slot.getMaxStackSize() != 64) {
16+
+ if (player instanceof ServerPlayer serverPlayer && slot.getMaxStackSize() != net.minecraft.world.Container.MAX_STACK) { // Purpur - PaperPR#12654
17+
serverPlayer.connection.send(new net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), slot.index, slot.getItem()));
18+
// Updating a crafting inventory makes the client reset the result slot, have to send it again
19+
if (this.getBukkitView().getType() == org.bukkit.event.inventory.InventoryType.WORKBENCH || this.getBukkitView().getType() == org.bukkit.event.inventory.InventoryType.CRAFTING) {

0 commit comments

Comments
 (0)