Don't filter out -1 data in ItemStack. Fixes BUKKIT-3824

This commit is contained in:
Travis Watkins 2013-03-20 09:41:16 -05:00
parent 26d1f9189a
commit 2fc755cc65

View File

@ -156,7 +156,7 @@ public final class ItemStack {
return;
}
if (!(this.usesData() || Item.byId[this.id].o() || this.id > 256)) { // Should be canBeDepleted
if (!(this.usesData() || Item.byId[this.id].o() || this.id > 255)) { // Should be usesDurability
i = 0;
}
@ -167,7 +167,7 @@ public final class ItemStack {
// CraftBukkit end
this.damage = i;
if (this.damage < 0) {
if (this.damage < -1) { // CraftBukkit - don't filter -1, we use it
this.damage = 0;
}
}