summaryrefslogtreecommitdiffstats
path: root/nms-patches/InventoryLargeChest.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-11-17 12:41:03 +1100
committermd_5 <git@md-5.net>2016-11-17 12:41:03 +1100
commitc25ddf063a808e3adb749e22017661f403c5fb7e (patch)
treeb2efcff512be12fd3e38cf8c36386148ce6ab4ae /nms-patches/InventoryLargeChest.patch
parent51263e97187a84338f89698eef187284055a682a (diff)
downloadcraftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.gz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.lz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.xz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.zip
Update to Minecraft 1.11
Diffstat (limited to 'nms-patches/InventoryLargeChest.patch')
-rw-r--r--nms-patches/InventoryLargeChest.patch18
1 files changed, 9 insertions, 9 deletions
diff --git a/nms-patches/InventoryLargeChest.patch b/nms-patches/InventoryLargeChest.patch
index 253d591a..3ed9ccd8 100644
--- a/nms-patches/InventoryLargeChest.patch
+++ b/nms-patches/InventoryLargeChest.patch
@@ -1,30 +1,30 @@
--- a/net/minecraft/server/InventoryLargeChest.java
+++ b/net/minecraft/server/InventoryLargeChest.java
-@@ -1,6 +1,13 @@
+@@ -1,11 +1,62 @@
package net.minecraft.server;
- import javax.annotation.Nullable;
+// CraftBukkit start
++import java.util.ArrayList;
+import java.util.List;
+import org.bukkit.Location;
+
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
+import org.bukkit.entity.HumanEntity;
+// CraftBukkit end
-
++
public class InventoryLargeChest implements ITileInventory {
-@@ -8,6 +15,48 @@
+ private final String a;
public final ITileInventory left;
public final ITileInventory right;
+ // CraftBukkit start - add fields and methods
+ public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
+
-+ public ItemStack[] getContents() {
-+ ItemStack[] result = new ItemStack[this.getSize()];
-+ for (int i = 0; i < result.length; i++) {
-+ result[i] = this.getItem(i);
++ public List<ItemStack> getContents() {
++ List<ItemStack> result = new ArrayList<ItemStack>(this.getSize());
++ for (int i = 0; i < this.getSize(); i++) {
++ result.add(this.getItem(i));
+ }
+ return result;
+ }
@@ -63,7 +63,7 @@
public InventoryLargeChest(String s, ITileInventory itileinventory, ITileInventory itileinventory1) {
this.a = s;
if (itileinventory == null) {
-@@ -73,7 +122,7 @@
+@@ -72,7 +123,7 @@
}
public int getMaxStackSize() {