From f95e0cbeef13b07b2f60b629c47f08219baee596 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Fri, 18 Nov 2016 15:12:11 +1100 Subject: [PATCH] SPIGOT-2790: Remove negative item ID filtering again By: md_5 --- paper-server/nms-patches/ItemStack.patch | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/paper-server/nms-patches/ItemStack.patch b/paper-server/nms-patches/ItemStack.patch index 875a90e96e..e2b38e4189 100644 --- a/paper-server/nms-patches/ItemStack.patch +++ b/paper-server/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. } - }