mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 14:35:11 +01:00
30f02fe6e5
I think its pretty clear that no one uses this given that it didn't work at all before
22 lines
784 B
Diff
22 lines
784 B
Diff
From 3d18173ece90994e98f666ca2a2d7cfc60165fbe Mon Sep 17 00:00:00 2001
|
|
From: Joseph Hirschfeld <joe@ibj.io>
|
|
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/server/Container.java b/src/main/java/net/minecraft/server/Container.java
|
|
index 000b4db..e72eac4 100644
|
|
--- a/src/main/java/net/minecraft/server/Container.java
|
|
+++ b/src/main/java/net/minecraft/server/Container.java
|
|
@@ -110,7 +110,7 @@ public abstract class Container {
|
|
}
|
|
|
|
public ItemStack b(EntityHuman entityhuman, int i) {
|
|
- Slot slot = (Slot) this.c.get(i);
|
|
+ Slot slot = i < this.c.size() ? this.c.get(i) : null; // Paper - Ensure drag in bounds
|
|
|
|
return slot != null ? slot.getItem() : null;
|
|
}
|
|
--
|
|
2.7.2
|
|
|