From 737e8c512759169a0ca83e04c47fe7c06012457b Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Sat, 16 Mar 2013 18:16:00 -0500 Subject: [PATCH] Allow special crafting data value on items. Fixes BUKKIT-3780 --- src/main/java/net/minecraft/server/ItemStack.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java index 3b3a48dc4d..d528420d2a 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; }