From 515830cda90268dff4c9b695dc1c1ed8f35b4912 Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Sat, 16 Mar 2013 13:26:29 -0500 Subject: Filter negative values for all items. --- src/main/java/net/minecraft/server/ItemStack.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java index 09b46789..e98836df 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -151,14 +151,12 @@ public final class ItemStack { public void setData(int i) { // CraftBukkit start - filter out data for items that shouldn't have it if (!this.usesData()) { - this.damage = 0; - return; + i = 0; } // Filter wool to avoid confusing the client if (this.id == Block.WOOL.id) { - this.damage = Math.min(15, i); - return; + i = Math.min(15, i); } // CraftBukkit end -- cgit v1.2.3