summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemStack.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-11-18 15:12:11 +1100
committermd_5 <git@md-5.net>2016-11-18 15:25:43 +1100
commit8095a750e7eebc5c3d67532a8f1fa84b5a8e1976 (patch)
treeb2b8fb55b30e7e6458f74a4c0121790ae17307d4 /nms-patches/ItemStack.patch
parent0805f60443907287a362219b74c1402885bb33a8 (diff)
downloadcraftbukkit-8095a750e7eebc5c3d67532a8f1fa84b5a8e1976.tar
craftbukkit-8095a750e7eebc5c3d67532a8f1fa84b5a8e1976.tar.gz
craftbukkit-8095a750e7eebc5c3d67532a8f1fa84b5a8e1976.tar.lz
craftbukkit-8095a750e7eebc5c3d67532a8f1fa84b5a8e1976.tar.xz
craftbukkit-8095a750e7eebc5c3d67532a8f1fa84b5a8e1976.zip
SPIGOT-2790: Remove negative item ID filtering again
Diffstat (limited to 'nms-patches/ItemStack.patch')
-rw-r--r--nms-patches/ItemStack.patch13
1 files changed, 8 insertions, 5 deletions
diff --git a/nms-patches/ItemStack.patch b/nms-patches/ItemStack.patch
index 875a90e9..e2b38e41 100644
--- a/nms-patches/ItemStack.patch
+++ b/nms-patches/ItemStack.patch
@@ -20,7 +20,7 @@
public final class ItemStack {
public static final ItemStack a = new ItemStack((Item) null);
-@@ -46,6 +59,15 @@
+@@ -46,28 +59,49 @@
this.item = item;
this.damage = j;
this.count = i;
@@ -34,9 +34,11 @@
+ }
+ // CraftBukkit end
if (this.damage < 0) {
- this.damage = 0;
+- this.damage = 0;
++ // this.damage = 0; // CraftBukkit - remove this.
}
-@@ -54,20 +76,32 @@
+
+ this.F();
}
private void F() {
@@ -52,7 +54,7 @@
- this.damage = Math.max(0, nbttagcompound.getShort("Damage"));
+ // CraftBukkit start - Route through setData for filtering
+ // this.damage = Math.max(0, nbttagcompound.getShort("Damage"));
-+ this.setData(Math.max(0, nbttagcompound.getShort("Damage")));
++ this.setData(nbttagcompound.getShort("Damage"));
+ // CraftBukkit end
+
if (nbttagcompound.hasKeyOfType("tag", 10)) {
@@ -247,7 +249,8 @@
+ // CraftBukkit end
this.damage = i;
if (this.damage < 0) {
- this.damage = 0;
+- this.damage = 0;
++ // this.damage = 0; // CraftBukkit - remove this.
}
-
}