Java 类org.bukkit.craftbukkit.Overridden 实例源码
项目:Uranium
文件:CraftMetaItem.java
@Overridden
void applyToItem(net.minecraft.nbt.NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new net.minecraft.nbt.NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInteger(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.setTag(ATTRIBUTES.NBT, attributes);
}
}
项目:Uranium
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:ThermosRebased
文件:CraftMetaItem.java
@Overridden
void applyToItem(net.minecraft.nbt.NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new net.minecraft.nbt.NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInteger(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.setTag(ATTRIBUTES.NBT, attributes);
}
}
项目:ThermosRebased
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:Thermos
文件:CraftMetaItem.java
@Overridden
void applyToItem(net.minecraft.nbt.NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new net.minecraft.nbt.NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInteger(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.setTag(ATTRIBUTES.NBT, attributes);
}
}
项目:Thermos
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:KCauldron
文件:CraftMetaItem.java
@Overridden
void applyToItem(net.minecraft.nbt.NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new net.minecraft.nbt.NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInteger(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.setTag(ATTRIBUTES.NBT, attributes);
}
}
项目:KCauldron
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:CauldronGit
文件:CraftMetaItem.java
@Overridden
void applyToItem(net.minecraft.nbt.NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new net.minecraft.nbt.NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInteger(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.setTag(ATTRIBUTES.NBT, attributes);
}
}
项目:CauldronGit
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:Cauldron-Old
文件:CraftMetaItem.java
@Overridden
void applyToItem(net.minecraft.nbt.NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new net.minecraft.nbt.NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInteger(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.setTag(ATTRIBUTES.NBT, attributes);
}
}
项目:Cauldron-Old
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:Cauldron-Reloaded
文件:CraftMetaItem.java
@Overridden
void applyToItem(net.minecraft.nbt.NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new net.minecraft.nbt.NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInteger(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.setTag(ATTRIBUTES.NBT, attributes);
}
}
项目:Cauldron-Reloaded
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:FFoKC
文件:CraftMetaItem.java
@Overridden
void applyToItem(net.minecraft.nbt.NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new net.minecraft.nbt.NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInteger(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.setTag(ATTRIBUTES.NBT, attributes);
}
}
项目:FFoKC
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:CraftBukkit
文件:CraftMetaItem.java
@Overridden
void applyToItem(NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInt(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.set(ATTRIBUTES.NBT, attributes);
}
}
项目:CraftBukkit
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:Craftbukkit
文件:CraftMetaItem.java
@Overridden
void applyToItem(NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
if (hideFlag != 0) {
itemTag.setInt(HIDEFLAGS.NBT, hideFlag);
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInt(REPAIR.NBT, repairCost);
}
for (Map.Entry<String, NBTBase> e : unhandledTags.entrySet()) {
itemTag.set(e.getKey(), e.getValue());
}
}
项目:Almura-Server
文件:CraftMetaItem.java
@Overridden
void applyToItem(NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new NBTTagString(NAME.NBT, displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore, LORE));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInt(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.set(ATTRIBUTES.NBT, attributes);
}
}
项目:Almura-Server
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:Tweakkit-Server
文件:CraftMetaItem.java
@Overridden
void applyToItem(NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInt(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.set(ATTRIBUTES.NBT, attributes);
}
}
项目:Tweakkit-Server
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:Cauldron
文件:CraftMetaItem.java
@Overridden
void applyToItem(net.minecraft.nbt.NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new net.minecraft.nbt.NBTTagString(displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInteger(REPAIR.NBT, repairCost);
}
if (attributes != null) {
itemTag.setTag(ATTRIBUTES.NBT, attributes);
}
}
项目:Cauldron
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:Craft-city
文件:CraftMetaItem.java
@Overridden
void applyToItem(NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new NBTTagString(NAME.NBT, displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore, LORE));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.setInt(REPAIR.NBT, repairCost);
}
}
项目:Craft-city
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:MCPBukkit
文件:CraftMetaItem.java
@Overridden
void applyToItem(net.minecraft.nbt.NBTTagCompound itemTag) {
if (hasDisplayName()) {
setDisplayTag(itemTag, NAME.NBT, new net.minecraft.nbt.NBTTagString(NAME.NBT, displayName));
}
if (hasLore()) {
setDisplayTag(itemTag, LORE.NBT, createStringList(lore, LORE));
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
if (hasRepairCost()) {
itemTag.func_74768_a(REPAIR.NBT, repairCost);
}
}
项目:MCPBukkit
文件:CraftMetaItem.java
@Overridden
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
if (hasDisplayName()) {
builder.put(NAME.BUKKIT, displayName);
}
if (hasLore()) {
builder.put(LORE.BUKKIT, ImmutableList.copyOf(lore));
}
serializeEnchantments(enchantments, builder, ENCHANTMENTS);
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
return builder;
}
项目:Uranium
文件:CraftMetaItem.java
/**
* This method is almost as weird as notUncommon.
* Only return false if your common internals are unequal.
* Checking your own internals is redundant if you are not common, as notUncommon is meant for checking those 'not common' variables.
*/
@Overridden
boolean equalsCommon(CraftMetaItem that) {
return ((this.hasDisplayName() ? that.hasDisplayName() && this.displayName.equals(that.displayName) : !that.hasDisplayName()))
&& (this.hasEnchants() ? that.hasEnchants() && this.enchantments.equals(that.enchantments) : !that.hasEnchants())
&& (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());
}
项目:Uranium
文件:CraftMetaItem.java
@Overridden
int applyHash() {
int hash = 3;
hash = 61 * hash + (hasDisplayName() ? this.displayName.hashCode() : 0);
hash = 61 * hash + (hasLore() ? this.lore.hashCode() : 0);
hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0);
hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0);
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
return hash;
}
项目:ThermosRebased
文件:CraftMetaItem.java
/**
* This method is almost as weird as notUncommon.
* Only return false if your common internals are unequal.
* Checking your own internals is redundant if you are not common, as notUncommon is meant for checking those 'not common' variables.
*/
@Overridden
boolean equalsCommon(CraftMetaItem that) {
return ((this.hasDisplayName() ? that.hasDisplayName() && this.displayName.equals(that.displayName) : !that.hasDisplayName()))
&& (this.hasEnchants() ? that.hasEnchants() && this.enchantments.equals(that.enchantments) : !that.hasEnchants())
&& (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());
}
项目:ThermosRebased
文件:CraftMetaItem.java
@Overridden
int applyHash() {
int hash = 3;
hash = 61 * hash + (hasDisplayName() ? this.displayName.hashCode() : 0);
hash = 61 * hash + (hasLore() ? this.lore.hashCode() : 0);
hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0);
hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0);
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
return hash;
}
项目:Thermos
文件:CraftMetaItem.java
/**
* This method is almost as weird as notUncommon.
* Only return false if your common internals are unequal.
* Checking your own internals is redundant if you are not common, as notUncommon is meant for checking those 'not common' variables.
*/
@Overridden
boolean equalsCommon(CraftMetaItem that) {
return ((this.hasDisplayName() ? that.hasDisplayName() && this.displayName.equals(that.displayName) : !that.hasDisplayName()))
&& (this.hasEnchants() ? that.hasEnchants() && this.enchantments.equals(that.enchantments) : !that.hasEnchants())
&& (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());
}
项目:Thermos
文件:CraftMetaItem.java
@Overridden
int applyHash() {
int hash = 3;
hash = 61 * hash + (hasDisplayName() ? this.displayName.hashCode() : 0);
hash = 61 * hash + (hasLore() ? this.lore.hashCode() : 0);
hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0);
hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0);
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
return hash;
}
项目:KCauldron
文件:CraftMetaItem.java
/**
* This method is almost as weird as notUncommon.
* Only return false if your common internals are unequal.
* Checking your own internals is redundant if you are not common, as notUncommon is meant for checking those 'not common' variables.
*/
@Overridden
boolean equalsCommon(CraftMetaItem that) {
return ((this.hasDisplayName() ? that.hasDisplayName() && this.displayName.equals(that.displayName) : !that.hasDisplayName()))
&& (this.hasEnchants() ? that.hasEnchants() && this.enchantments.equals(that.enchantments) : !that.hasEnchants())
&& (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());
}
项目:KCauldron
文件:CraftMetaItem.java
@Overridden
int applyHash() {
int hash = 3;
hash = 61 * hash + (hasDisplayName() ? this.displayName.hashCode() : 0);
hash = 61 * hash + (hasLore() ? this.lore.hashCode() : 0);
hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0);
hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0);
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
return hash;
}
项目:CauldronGit
文件:CraftMetaItem.java
/**
* This method is almost as weird as notUncommon.
* Only return false if your common internals are unequal.
* Checking your own internals is redundant if you are not common, as notUncommon is meant for checking those 'not common' variables.
*/
@Overridden
boolean equalsCommon(CraftMetaItem that) {
return ((this.hasDisplayName() ? that.hasDisplayName() && this.displayName.equals(that.displayName) : !that.hasDisplayName()))
&& (this.hasEnchants() ? that.hasEnchants() && this.enchantments.equals(that.enchantments) : !that.hasEnchants())
&& (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());
}
项目:CauldronGit
文件:CraftMetaItem.java
@Overridden
int applyHash() {
int hash = 3;
hash = 61 * hash + (hasDisplayName() ? this.displayName.hashCode() : 0);
hash = 61 * hash + (hasLore() ? this.lore.hashCode() : 0);
hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0);
hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0);
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
return hash;
}
项目:Cauldron-Old
文件:CraftMetaItem.java
/**
* This method is almost as weird as notUncommon.
* Only return false if your common internals are unequal.
* Checking your own internals is redundant if you are not common, as notUncommon is meant for checking those 'not common' variables.
*/
@Overridden
boolean equalsCommon(CraftMetaItem that) {
return ((this.hasDisplayName() ? that.hasDisplayName() && this.displayName.equals(that.displayName) : !that.hasDisplayName()))
&& (this.hasEnchants() ? that.hasEnchants() && this.enchantments.equals(that.enchantments) : !that.hasEnchants())
&& (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());
}