Fix some missing diffs

This commit is contained in:
Owen1212055 2023-12-06 15:11:00 -05:00
parent d3f1bc04b4
commit ff2946e04b
No known key found for this signature in database
GPG key ID: 2133292072886A30
2 changed files with 11 additions and 3 deletions

View file

@ -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);

View file

@ -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;
}