Minor bug fixes

This commit is contained in:
Thinkofdeath 2014-12-07 12:18:50 +00:00
parent c571bbe590
commit fb445e5337
2 changed files with 5 additions and 2 deletions

View File

@ -27,6 +27,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
CraftMetaBanner(CraftMetaItem meta) { CraftMetaBanner(CraftMetaItem meta) {
super(meta); super(meta);
blockEntityTag = null;
if (!(meta instanceof CraftMetaBanner)) { if (!(meta instanceof CraftMetaBanner)) {
return; return;
@ -39,6 +40,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
CraftMetaBanner(NBTTagCompound tag) { CraftMetaBanner(NBTTagCompound tag) {
super(tag); super(tag);
blockEntityTag = null;
if (!tag.hasKey("BlockEntityTag")) { if (!tag.hasKey("BlockEntityTag")) {
return; return;
@ -59,6 +61,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
CraftMetaBanner(Map<String, Object> map) { CraftMetaBanner(Map<String, Object> map) {
super(map); super(map);
blockEntityTag = null;
String baseStr = SerializableMeta.getString(map, BASE.BUKKIT, true); String baseStr = SerializableMeta.getString(map, BASE.BUKKIT, true);
if (baseStr != null) { if (baseStr != null) {

View File

@ -204,7 +204,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
private Map<Enchantment, Integer> enchantments; private Map<Enchantment, Integer> enchantments;
private int repairCost; private int repairCost;
private final NBTTagList attributes; private final NBTTagList attributes;
private final NBTTagCompound blockEntityTag; protected NBTTagCompound blockEntityTag;
CraftMetaItem(CraftMetaItem meta) { CraftMetaItem(CraftMetaItem meta) {
if (meta == null) { if (meta == null) {
@ -556,7 +556,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
&& (this.hasLore() ? that.hasLore() && this.lore.equals(that.lore) : !that.hasLore()) && (this.hasLore() ? that.hasLore() && this.lore.equals(that.lore) : !that.hasLore())
&& (this.hasAttributes() ? that.hasAttributes() && this.attributes.equals(that.attributes) : !that.hasAttributes()) && (this.hasAttributes() ? that.hasAttributes() && this.attributes.equals(that.attributes) : !that.hasAttributes())
&& (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost()) && (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);
} }
/** /**