-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
117 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
patches/server/0046-Paper-Add-another-slot-sanity-check.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: IPECTER <ipectert@gmail.com> | ||
Date: Sat, 30 Dec 2023 21:50:18 +0900 | ||
Subject: [PATCH] Paper-Add-another-slot-sanity-check | ||
|
||
Backport of Paper ver/1.20.2 8493340 | ||
|
||
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java | ||
index 38d47fbcd49cc291040ea00470abeb982fe2714c..662f3eee6ff17e0b0191b1c59066465db818ed2b 100644 | ||
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java | ||
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java | ||
@@ -600,7 +600,7 @@ public abstract class AbstractContainerMenu { | ||
int j2; | ||
|
||
if (actionType == ClickType.SWAP) { | ||
- if (slotIndex < 0) return; // Paper | ||
+ if (slotIndex < 0 || button < 0) return; // Paper | ||
slot2 = (Slot) this.slots.get(slotIndex); | ||
itemstack1 = playerinventory.getItem(button); | ||
itemstack = slot2.getItem(); |
Oops, something went wrong.