当前位置: 首页>>代码示例>>Java>>正文


Java Overridden类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:21,代码来源:CraftMetaItem.java

示例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;
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:19,代码来源:CraftMetaItem.java

示例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);
    }
}
 
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:21,代码来源:CraftMetaItem.java

示例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());
    }
}
 
开发者ID:tgnmc,项目名称:Craftbukkit,代码行数:25,代码来源:CraftMetaItem.java

示例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);
    }
}
 
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:21,代码来源:CraftMetaItem.java

示例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);
    }
}
 
开发者ID:didoupimpon,项目名称:Craft-city,代码行数:17,代码来源:CraftMetaItem.java

示例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);
    }
}
 
开发者ID:agaricusb,项目名称:MCPBukkit,代码行数:17,代码来源:CraftMetaItem.java

示例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());
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:14,代码来源:CraftMetaItem.java

示例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;
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:11,代码来源:CraftMetaItem.java


注:本文中的org.bukkit.craftbukkit.Overridden类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。