diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-03-16 18:16:00 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-16 18:16:00 -0500 |
commit | 737e8c512759169a0ca83e04c47fe7c06012457b (patch) | |
tree | 539bb883aff0fb1d3e33a3254f30ea35fce8b151 /src/main/java/net/minecraft/server | |
parent | 5515b0ee2b1f77b8f9083b4f087d48069d513062 (diff) | |
download | craftbukkit-737e8c512759169a0ca83e04c47fe7c06012457b.tar craftbukkit-737e8c512759169a0ca83e04c47fe7c06012457b.tar.gz craftbukkit-737e8c512759169a0ca83e04c47fe7c06012457b.tar.lz craftbukkit-737e8c512759169a0ca83e04c47fe7c06012457b.tar.xz craftbukkit-737e8c512759169a0ca83e04c47fe7c06012457b.zip |
Allow special crafting data value on items. Fixes BUKKIT-3780
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemStack.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java index 3b3a48dc..d528420d 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -150,6 +150,12 @@ public final class ItemStack { public void setData(int i) { // CraftBukkit start - filter out data for items that shouldn't have it + // The crafting system uses this value for a special purpose so we have to allow it + if (i == 32767) { + this.damage = i; + return; + } + if (!(this.usesData() || Item.byId[this.id].o())) { // Should be canBeDepleted i = 0; } |