summaryrefslogtreecommitdiffstats
path: root/nms-patches/Container.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-05-10 21:47:39 +1000
committermd_5 <git@md-5.net>2016-05-10 21:47:39 +1000
commitc5e9a169fa564f3b8119b6666f8df59d5a9b45c3 (patch)
tree9f3b1ce732f0082b71512b1dddb7abb35526226e /nms-patches/Container.patch
parent4cb32587ac1ff543b2efa9498f8d0d358cb90c12 (diff)
downloadcraftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.gz
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.lz
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.xz
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.zip
Minecraft 1.9.4
Diffstat (limited to 'nms-patches/Container.patch')
-rw-r--r--nms-patches/Container.patch22
1 files changed, 11 insertions, 11 deletions
diff --git a/nms-patches/Container.patch b/nms-patches/Container.patch
index cc1df43a..9e43c736 100644
--- a/nms-patches/Container.patch
+++ b/nms-patches/Container.patch
@@ -1,8 +1,8 @@
--- a/net/minecraft/server/Container.java
+++ b/net/minecraft/server/Container.java
-@@ -7,6 +7,17 @@
- import java.util.List;
+@@ -8,6 +8,17 @@
import java.util.Set;
+ import javax.annotation.Nullable;
+// CraftBukkit start
+import java.util.HashMap;
@@ -18,7 +18,7 @@
public abstract class Container {
public List<ItemStack> b = Lists.newArrayList();
-@@ -18,12 +29,24 @@
+@@ -19,12 +30,24 @@
protected List<ICrafting> listeners = Lists.newArrayList();
private Set<EntityHuman> i = Sets.newHashSet();
@@ -44,7 +44,7 @@
return slot;
}
-@@ -124,6 +147,7 @@
+@@ -128,6 +151,7 @@
k = playerinventory.getCarried().count;
Iterator iterator = this.h.iterator();
@@ -52,7 +52,7 @@
while (iterator.hasNext()) {
Slot slot1 = (Slot) iterator.next();
-@@ -141,16 +165,48 @@
+@@ -145,16 +169,48 @@
}
k -= itemstack2.count - i1;
@@ -106,7 +106,7 @@
}
this.d();
-@@ -173,8 +229,14 @@
+@@ -177,8 +233,14 @@
}
if (j == 1) {
@@ -123,7 +123,7 @@
playerinventory.setCarried((ItemStack) null);
}
}
-@@ -225,7 +287,11 @@
+@@ -229,7 +291,11 @@
slot2.set(itemstack3.cloneAndSubtract(j1));
if (itemstack3.count == 0) {
playerinventory.setCarried((ItemStack) null);
@@ -135,7 +135,7 @@
}
} else if (slot2.isAllowed(entityhuman)) {
if (itemstack3 == null) {
-@@ -255,7 +321,11 @@
+@@ -259,7 +325,11 @@
itemstack3.cloneAndSubtract(j1);
if (itemstack3.count == 0) {
playerinventory.setCarried((ItemStack) null);
@@ -147,7 +147,7 @@
itemstack1.count += j1;
} else if (itemstack3.count <= slot2.getMaxStackSize(itemstack3)) {
-@@ -264,7 +334,10 @@
+@@ -268,7 +338,10 @@
}
} else if (itemstack1.getItem() == itemstack3.getItem() && itemstack3.getMaxStackSize() > 1 && (!itemstack1.usesData() || itemstack1.getData() == itemstack3.getData()) && ItemStack.equals(itemstack1, itemstack3)) {
j1 = itemstack1.count;
@@ -159,7 +159,7 @@
itemstack3.count += j1;
itemstack1 = slot2.a(j1);
if (itemstack1.count == 0) {
-@@ -272,11 +345,24 @@
+@@ -276,11 +349,24 @@
}
slot2.a(entityhuman, playerinventory.getCarried());
@@ -184,7 +184,7 @@
}
}
} else if (inventoryclicktype == InventoryClickType.SWAP && j >= 0 && j < 9) {
-@@ -430,14 +516,17 @@
+@@ -434,14 +520,17 @@
if (itemstack1 != null && a(itemstack, itemstack1)) {
int l = itemstack1.count + itemstack.count;