diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-27 00:51:59 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-27 00:51:59 +0000 |
commit | 306b233a40198168e3d9683e5ae469594fe42194 (patch) | |
tree | 19e23cc79572973783a4af82a0dd44fa059c6008 /src/main/java | |
parent | 264d479fd8284f8d689e93a1aa66b3c5cd1ee54a (diff) | |
download | craftbukkit-306b233a40198168e3d9683e5ae469594fe42194.tar craftbukkit-306b233a40198168e3d9683e5ae469594fe42194.tar.gz craftbukkit-306b233a40198168e3d9683e5ae469594fe42194.tar.lz craftbukkit-306b233a40198168e3d9683e5ae469594fe42194.tar.xz craftbukkit-306b233a40198168e3d9683e5ae469594fe42194.zip |
SPIGOT-279: Fix all metadata being cleared for items that support blockEntityTag on material mis-match
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java | 7 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTileEntity.java | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java index b46d3b5c..0f89623d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -103,13 +103,6 @@ public final class CraftItemFactory implements ItemFactory { case HOPPER: case REDSTONE_COMPARATOR: case FLOWER_POT_ITEM: - if (meta instanceof CraftMetaTileEntity) { - CraftMetaTileEntity te = (CraftMetaTileEntity) meta; - if (te.material != material) { - return new CraftMetaTileEntity((CraftMetaTileEntity) null, material); - } - return meta; - } return new CraftMetaTileEntity(meta, material); default: return new CraftMetaItem(meta); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTileEntity.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTileEntity.java index fc293741..6718f96e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTileEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTileEntity.java @@ -20,7 +20,7 @@ public class CraftMetaTileEntity extends CraftMetaItem { super(meta); this.material = material; - if (!(meta instanceof CraftMetaTileEntity)) { + if (!(meta instanceof CraftMetaTileEntity) || ((CraftMetaTileEntity) meta).material != material) { blockEntityTag = null; return; } |