summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2012-10-28 09:37:47 -0500
committerTravis Watkins <amaranth@ubuntu.com>2012-10-28 09:37:47 -0500
commit37a0d6757d66e5051de58d5e2f85cd74ab02f57d (patch)
treec9c63acd97729b2f4e76ce5935b73df7da7629cd
parent9841b77009447a70913f65b6c2809e862d046f3a (diff)
downloadcraftbukkit-37a0d6757d66e5051de58d5e2f85cd74ab02f57d.tar
craftbukkit-37a0d6757d66e5051de58d5e2f85cd74ab02f57d.tar.gz
craftbukkit-37a0d6757d66e5051de58d5e2f85cd74ab02f57d.tar.lz
craftbukkit-37a0d6757d66e5051de58d5e2f85cd74ab02f57d.tar.xz
craftbukkit-37a0d6757d66e5051de58d5e2f85cd74ab02f57d.zip
Don't filter item data for anvils. Fixes BUKKIT-2640
Filtering item data is usually a good idea to make sure we don't have invalid data or data on items that shouldn't have it. However, anvils use item data in slightly different way and so running its code for filtering here causes the data to be corrupted.
-rw-r--r--src/main/java/net/minecraft/server/ItemStack.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 05e5df36..ac6bc3c1 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -154,7 +154,7 @@ public final class ItemStack {
}
public void setData(int i) {
- this.damage = (this.id > 0) && (this.id < 256) ? Item.byId[this.id].filterData(i) : i; // CraftBukkit
+ this.damage = (this.id > 0) && (this.id < 256) && (this.id != Block.ANVIL.id) ? Item.byId[this.id].filterData(i) : i; // CraftBukkit
}
public int k() {