Fix hashcode / equals / formatting.
Dieser Commit ist enthalten in:
Ursprung
0483f0f414
Commit
726656b864
@ -625,6 +625,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.unhandledTags.equals(that.unhandledTags))
|
||||||
&& (this.hideFlag == that.hideFlag);
|
&& (this.hideFlag == that.hideFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -651,6 +652,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
|||||||
hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0);
|
hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0);
|
||||||
hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0);
|
hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0);
|
||||||
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
|
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
|
||||||
|
hash = 61 * hash + unhandledTags.hashCode();
|
||||||
hash = 61 * hash + hideFlag;
|
hash = 61 * hash + hideFlag;
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
@ -767,24 +769,24 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
|||||||
synchronized (HANDLED_TAGS) {
|
synchronized (HANDLED_TAGS) {
|
||||||
if (HANDLED_TAGS.isEmpty()) {
|
if (HANDLED_TAGS.isEmpty()) {
|
||||||
HANDLED_TAGS.addAll(Arrays.asList(
|
HANDLED_TAGS.addAll(Arrays.asList(
|
||||||
DISPLAY.NBT,
|
DISPLAY.NBT,
|
||||||
REPAIR.NBT,
|
REPAIR.NBT,
|
||||||
ATTRIBUTES.NBT,
|
ATTRIBUTES.NBT,
|
||||||
ENCHANTMENTS.NBT,
|
ENCHANTMENTS.NBT,
|
||||||
CraftMetaMap.MAP_SCALING.NBT,
|
CraftMetaMap.MAP_SCALING.NBT,
|
||||||
CraftMetaPotion.POTION_EFFECTS.NBT,
|
CraftMetaPotion.POTION_EFFECTS.NBT,
|
||||||
CraftMetaSkull.SKULL_OWNER.NBT,
|
CraftMetaSkull.SKULL_OWNER.NBT,
|
||||||
CraftMetaTileEntity.BLOCK_ENTITY_TAG.NBT,
|
CraftMetaTileEntity.BLOCK_ENTITY_TAG.NBT,
|
||||||
CraftMetaBook.BOOK_TITLE.NBT,
|
CraftMetaBook.BOOK_TITLE.NBT,
|
||||||
CraftMetaBook.BOOK_AUTHOR.NBT,
|
CraftMetaBook.BOOK_AUTHOR.NBT,
|
||||||
CraftMetaBook.BOOK_PAGES.NBT,
|
CraftMetaBook.BOOK_PAGES.NBT,
|
||||||
CraftMetaBook.RESOLVED.NBT,
|
CraftMetaBook.RESOLVED.NBT,
|
||||||
CraftMetaBook.GENERATION.NBT,
|
CraftMetaBook.GENERATION.NBT,
|
||||||
CraftMetaFirework.FIREWORKS.NBT,
|
CraftMetaFirework.FIREWORKS.NBT,
|
||||||
CraftMetaEnchantedBook.STORED_ENCHANTMENTS.NBT,
|
CraftMetaEnchantedBook.STORED_ENCHANTMENTS.NBT,
|
||||||
CraftMetaCharge.EXPLOSION.NBT
|
CraftMetaCharge.EXPLOSION.NBT
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
return HANDLED_TAGS;
|
return HANDLED_TAGS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren