本文整理汇总了Java中org.bukkit.craftbukkit.Overridden类的典型用法代码示例。如果您正苦于以下问题:Java Overridden类的具体用法?Java Overridden怎么用?Java Overridden使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Overridden类属于org.bukkit.craftbukkit包,在下文中一共展示了Overridden类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: applyToItem
import org.bukkit.craftbukkit.Overridden; //导入依赖的package包/类
@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);
}
}
示例2: serialize
import org.bukkit.craftbukkit.Overridden; //导入依赖的package包/类
@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;
}
示例3: applyToItem
import org.bukkit.craftbukkit.Overridden; //导入依赖的package包/类
@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);
}
}
示例4: applyToItem
import org.bukkit.craftbukkit.Overridden; //导入依赖的package包/类
@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());
}
}
示例5: applyToItem
import org.bukkit.craftbukkit.Overridden; //导入依赖的package包/类
@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);
}
}
示例6: applyToItem
import org.bukkit.craftbukkit.Overridden; //导入依赖的package包/类
@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);
}
}
示例7: applyToItem
import org.bukkit.craftbukkit.Overridden; //导入依赖的package包/类
@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);
}
}
示例8: equalsCommon
import org.bukkit.craftbukkit.Overridden; //导入依赖的package包/类
/**
* 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());
}
示例9: applyHash
import org.bukkit.craftbukkit.Overridden; //导入依赖的package包/类
@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;
}