diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-03-16 13:26:29 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-16 13:26:29 -0500 |
commit | 515830cda90268dff4c9b695dc1c1ed8f35b4912 (patch) | |
tree | e0a1e2fd0f9aa09738c198a1f69338c789fde4f6 /src/main/java/net/minecraft/server | |
parent | 6d88d545e9a516bf5e7fed3190fc5680e4d9b908 (diff) | |
download | craftbukkit-515830cda90268dff4c9b695dc1c1ed8f35b4912.tar craftbukkit-515830cda90268dff4c9b695dc1c1ed8f35b4912.tar.gz craftbukkit-515830cda90268dff4c9b695dc1c1ed8f35b4912.tar.lz craftbukkit-515830cda90268dff4c9b695dc1c1ed8f35b4912.tar.xz craftbukkit-515830cda90268dff4c9b695dc1c1ed8f35b4912.zip |
Filter negative values for all items.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemStack.java | 6 |
1 files changed, 2 insertions, 4 deletions
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 |