summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java3
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
index 994b9aaa..bdf74baa 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
@@ -27,6 +27,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
CraftMetaBanner(CraftMetaItem meta) {
super(meta);
+ blockEntityTag = null;
if (!(meta instanceof CraftMetaBanner)) {
return;
@@ -39,6 +40,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
CraftMetaBanner(NBTTagCompound tag) {
super(tag);
+ blockEntityTag = null;
if (!tag.hasKey("BlockEntityTag")) {
return;
@@ -59,6 +61,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
CraftMetaBanner(Map<String, Object> map) {
super(map);
+ blockEntityTag = null;
String baseStr = SerializableMeta.getString(map, BASE.BUKKIT, true);
if (baseStr != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index f6667134..c25d0819 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -204,7 +204,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
private Map<Enchantment, Integer> enchantments;
private int repairCost;
private final NBTTagList attributes;
- private final NBTTagCompound blockEntityTag;
+ protected NBTTagCompound blockEntityTag;
CraftMetaItem(CraftMetaItem meta) {
if (meta == null) {
@@ -556,7 +556,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
&& (this.hasLore() ? that.hasLore() && this.lore.equals(that.lore) : !that.hasLore())
&& (this.hasAttributes() ? that.hasAttributes() && this.attributes.equals(that.attributes) : !that.hasAttributes())
&& (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost())
- && (this.blockEntityTag != null ? that.blockEntityTag != null && this.blockEntityTag.equals(this.blockEntityTag) : that.blockEntityTag == null);
+ && (this.blockEntityTag != null ? that.blockEntityTag != null && this.blockEntityTag.equals(that.blockEntityTag) : that.blockEntityTag == null);
}
/**