Merge branch 'ver/1.21.5' into ver/1.21.6

This commit is contained in:
granny
2025-06-13 22:30:22 -07:00
5 changed files with 30 additions and 7 deletions

View File

@@ -8,3 +8,12 @@
// CraftBukkit start
public boolean checkReachable = true;
public abstract org.bukkit.inventory.InventoryView getBukkitView();
@@ -552,7 +_,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() != net.minecraft.world.Container.MAX_STACK) { // Purpur - PaperPR#12654
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) {