diff --git a/patches/server/Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/Add-slot-sanity-checks-in-container-clicks.patch index 386d645a0c..7be1ff03ca 100644 --- a/patches/server/Add-slot-sanity-checks-in-container-clicks.patch +++ b/patches/server/Add-slot-sanity-checks-in-container-clicks.patch @@ -33,3 +33,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 slot = (Slot) this.slots.get(slotIndex); itemstack = this.getCarried(); if (AbstractContainerMenu.canItemQuickReplace(slot, itemstack, true) && slot.mayPlace(itemstack) && (this.quickcraftType == 2 || itemstack.getCount() > this.quickcraftSlots.size()) && this.canDragTo(slot)) { +@@ -0,0 +0,0 @@ public abstract class AbstractContainerMenu { + int j2; + + if (actionType == ClickType.SWAP && (button >= 0 && button < 9 || button == 40)) { ++ if (slotIndex < 0) return; // Paper + ItemStack itemstack4 = playerinventory.getItem(button); + + slot = (Slot) this.slots.get(slotIndex);