From ff2946e04b96364b648d75e06582266d8a391e99 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Wed, 6 Dec 2023 15:11:00 -0500 Subject: [PATCH] Fix some missing diffs --- ...07-Add-slot-sanity-checks-in-container-clicks.patch | 10 +++++++++- ...2-Add-missing-InventoryHolders-to-inventories.patch | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/patches/server/1007-Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/1007-Add-slot-sanity-checks-in-container-clicks.patch index 1ef2b2245c..86f35acb18 100644 --- a/patches/server/1007-Add-slot-sanity-checks-in-container-clicks.patch +++ b/patches/server/1007-Add-slot-sanity-checks-in-container-clicks.patch @@ -22,7 +22,7 @@ index f5f9af9bd3189c3455bce76d56a12503a8d87c35..9a94249834f8b0b8d3f6aeaf0c859ba8 Slot clickedSlot = this.player.containerMenu.getSlot(packet.getSlotNum()); if (clickedSlot.mayPickup(this.player)) { diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index 9ee3c2e0dcfaa4280be4973479c6490ded33809c..96a2d06e8da8bf0f0a3b0af813bf79d448940a3a 100644 +index 9ee3c2e0dcfaa4280be4973479c6490ded33809c..cdd230337584befb37f2e48b24dd504398b431a5 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -423,6 +423,7 @@ public abstract class AbstractContainerMenu { @@ -33,3 +33,11 @@ index 9ee3c2e0dcfaa4280be4973479c6490ded33809c..96a2d06e8da8bf0f0a3b0af813bf79d4 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)) { +@@ -597,6 +598,7 @@ 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); diff --git a/patches/server/1012-Add-missing-InventoryHolders-to-inventories.patch b/patches/server/1012-Add-missing-InventoryHolders-to-inventories.patch index c57b31245d..d633e8c51a 100644 --- a/patches/server/1012-Add-missing-InventoryHolders-to-inventories.patch +++ b/patches/server/1012-Add-missing-InventoryHolders-to-inventories.patch @@ -57,10 +57,10 @@ index 061e870e0cdd5bf00351b7e8104361bce86809f3..0259d188e6e16384069bf2a1c6e0197f public SimpleContainer(int i, org.bukkit.inventory.InventoryHolder owner) { this.bukkitOwner = owner; diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index 96a2d06e8da8bf0f0a3b0af813bf79d448940a3a..97426fe50149123e6a94989ee98c6d0aad4ca1cb 100644 +index cdd230337584befb37f2e48b24dd504398b431a5..8fd82051bba33b4703e4d99fff886b63a319a5ba 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -@@ -1028,4 +1028,15 @@ public abstract class AbstractContainerMenu { +@@ -1029,4 +1029,15 @@ public abstract class AbstractContainerMenu { this.stateId = this.stateId + 1 & 32767; return this.stateId; }