aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0054-Ensure-inv-drag-is-in-bounds.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0054-Ensure-inv-drag-is-in-bounds.patch')
-rw-r--r--patches/server/0054-Ensure-inv-drag-is-in-bounds.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0054-Ensure-inv-drag-is-in-bounds.patch b/patches/server/0054-Ensure-inv-drag-is-in-bounds.patch
new file mode 100644
index 0000000000..da2779ebd5
--- /dev/null
+++ b/patches/server/0054-Ensure-inv-drag-is-in-bounds.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Joseph Hirschfeld <[email protected]>
+Date: Thu, 3 Mar 2016 02:33:53 -0600
+Subject: [PATCH] Ensure inv drag is in bounds
+
+
+diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+index 333cbbf6f7761d619a1e41f9a08d7fcf0abf44f9..66261330157cef50dfabb7f92e9ece6dcd280951 100644
+--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
++++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+@@ -416,7 +416,7 @@ public abstract class AbstractContainerMenu {
+ this.resetQuickCraft();
+ }
+ } else if (this.quickcraftStatus == 1) {
+- slot = (Slot) this.slots.get(slotIndex);
++ slot = slotIndex < this.slots.size() ? this.slots.get(slotIndex) : null; // Paper - Ensure drag in bounds
+ itemstack = this.getCarried();
+ if (AbstractContainerMenu.canItemQuickReplace(slot, itemstack, true) && slot.mayPlace(itemstack) && (this.quickcraftType == 2 || itemstack.getCount() > this.quickcraftSlots.size()) && this.canDragTo(slot)) {
+ this.quickcraftSlots.add(slot);