本文整理匯總了Java中net.minecraft.item.EnumRarity類的典型用法代碼示例。如果您正苦於以下問題:Java EnumRarity類的具體用法?Java EnumRarity怎麽用?Java EnumRarity使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
EnumRarity類屬於net.minecraft.item包,在下文中一共展示了EnumRarity類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ItemCGArmor
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
public ItemCGArmor(String id, ArmorMaterial armorMaterial, String armorName, int renderIndex, EntityEquipmentSlot armorType)
{
super(armorMaterial, renderIndex, armorType);
this.armorName = armorName;
this.itemClass = EnumItemClass.MEDIUM_ARMOR;
this.isAirMask = false;
this.minAirToStartRefil = 0;
this.rarity = EnumRarity.COMMON;
setUnlocalizedName(id);
ItemsCG.registerItem(this, new ResourceLocation(ModInfo.MODID, id)); // Put into registry.
if (CompositeGear.ic2Tab != null) {
setCreativeTab(CompositeGear.ic2Tab);
}
}
示例2: initialize
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
@Override
public boolean initialize() {
config();
transporterBasic = addEntryItem(0, "standard0", CAPACITY[0], TANK[0], RANGE[0], DIMENSION[0], EnumRarity.COMMON);
transporterHardened = addEntryItem(1, "standard1", CAPACITY[1], TANK[1], RANGE[1], DIMENSION[1], EnumRarity.COMMON);
transporterReinforced = addEntryItem(2, "standard2", CAPACITY[2], TANK[2], RANGE[2], DIMENSION[2], EnumRarity.UNCOMMON);
transporterSignalum = addEntryItem(3, "standard3", CAPACITY[3], TANK[3], RANGE[3], DIMENSION[3], EnumRarity.UNCOMMON);
transporterResonant = addEntryItem(4, "standard4", CAPACITY[4], TANK[4], RANGE[4], DIMENSION[4], EnumRarity.RARE);
transporterCreative = addEntryItem(CREATIVE, "creative", CAPACITY[4], TANK[4], RANGE[4], DIMENSION[4], EnumRarity.EPIC, false);
Whoosh.proxy.addIModelRegister(this);
return true;
}
示例3: getRarity
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
@Override
public EnumRarity getRarity(ItemStack stack) {
if (this.getSpell(stack).getRarity() >= 4) {
return EnumRarity.EPIC;
}
if (this.getSpell(stack).getRarity() >= 3) {
return EnumRarity.RARE;
}
if (this.getSpell(stack).getRarity() >= 3) {
return EnumRarity.UNCOMMON;
}
return EnumRarity.COMMON;
}
示例4: load
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
public static void load()
{
Item.ToolMaterial compositeToolMaterial = EnumHelper.addToolMaterial("CG_COMPOSITE", 2, 1800, 6.0F, 2.0F, 13);
Item.ToolMaterial compositeDaggerMaterial = EnumHelper.addToolMaterial("CG_COMPOSITE_DAGGER", 2, 600, 6.0F, 0.0F, 15);
// TODO: Solve this garbage with materials.
ItemArmor.ArmorMaterial accessoryArmorMaterial = EnumHelper.addArmorMaterial("CG_ACCESSORY", null, 100, new int[] { 1, 2, 2, 1 }, 15, null, 0);
ItemArmor.ArmorMaterial compositeMaskArmorMaterial = EnumHelper.addArmorMaterial("CG_MASK_COMPOSITE", null, 50, new int[] { 3, 9, 6, 3 }, 12, null, 0);
ItemArmor.ArmorMaterial compositeArmorMaterial = EnumHelper.addArmorMaterial("CG_COMPOSITE", null, 50, new int[] { 3, 9, 6, 3 }, 12, null, 0);
// Armor
compositeHelmet = new ItemCompositeArmor("composite_helmet", compositeArmorMaterial, COMPOSITE_NAME, 0, EntityEquipmentSlot.HEAD).setDefaultColor(8815987).setRarity(EnumRarity.UNCOMMON);
compositeChestplate = new ItemCompositeArmor("composite_chestplate", compositeArmorMaterial, COMPOSITE_NAME , 0, EntityEquipmentSlot.CHEST).setDefaultColor(8815987).setRarity(EnumRarity.UNCOMMON);
compositeLeggings = new ItemCompositeArmor("composite_leggings", compositeArmorMaterial, COMPOSITE_NAME, 0, EntityEquipmentSlot.LEGS).setDefaultColor(8815987).setRarity(EnumRarity.UNCOMMON);
compositeBoots = new ItemCompositeArmor("composite_boots", compositeArmorMaterial, COMPOSITE_NAME, 0, EntityEquipmentSlot.FEET).setDefaultColor(8815987).setRarity(EnumRarity.UNCOMMON);
// Respirators
respiratorHalfMask = new ItemCGArmor("respirator_halfmask", accessoryArmorMaterial, "respirator_halfmask", 0, EntityEquipmentSlot.HEAD)
.setItemClass(EnumItemClass.ACCESSORY_ARMOR).setAirMask(true).setMinAir(80);
respiratorMask = new ItemCGArmor("respirator_mask", accessoryArmorMaterial, "respirator_mask", 0, EntityEquipmentSlot.HEAD)
.setItemClass(EnumItemClass.ACCESSORY_ARMOR).setAirMask(true).setMinAir(20).setMaxDamage(150);
respiratorMaskComposite = new ItemCGArmor("respirator_mask_composite", compositeMaskArmorMaterial, "respirator_mask_composite", 0, EntityEquipmentSlot.HEAD)
.setItemClass(EnumItemClass.LIGHT_ARMOR).setAirMask(true).setMinAir(20).setRarity(EnumRarity.UNCOMMON).setMaxDamage(200);
// Decorative
ushankaHat = new ItemCompositeArmor("ushanka_hat", accessoryArmorMaterial, "ushanka_hat", 0, EntityEquipmentSlot.HEAD).setDefaultColor(8487297)
.setItemClass(EnumItemClass.ACCESSORY_ARMOR).setHasDescription(true).setMaxDamage(300);
balaclavaMask = new ItemCompositeArmor("balaclava_mask", accessoryArmorMaterial, "balaclava_mask", 0, EntityEquipmentSlot.HEAD).setDefaultColor(8487297)
.setItemClass(EnumItemClass.ACCESSORY_ARMOR).setHasDescription(true);
shemaghMask = new ItemCompositeArmor("shemagh_mask", accessoryArmorMaterial, "shemagh_mask", 0, EntityEquipmentSlot.HEAD).setDefaultColor(8487297)
.setHasOverlayIcon(true).setItemClass(EnumItemClass.ACCESSORY_ARMOR).setHasDescription(true);
// Weapons
compositeSword = new ItemCGSword("composite_sword", compositeToolMaterial);
compositeDagger = new ItemCGSword("composite_dagger", compositeDaggerMaterial);
compositeBow = new ItemCGBow("composite_bow", 2000, 15);
if (CompositeGear.proxy.isClient()) {
registerMultiItem(compositeSword, "composite_sword", "items/tool/generic");
registerMultiItem(compositeDagger, "composite_dagger", "items/tool/generic");
registerItemModel(compositeBow, "tool/composite_bow");
}
}
示例5: getRarity
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
public int getRarity() {
if (stack.getRarity() == EnumRarity.COMMON) {
return 0;
} else if (stack.getRarity() == EnumRarity.UNCOMMON) {
return 1;
} else if (stack.getRarity() == EnumRarity.RARE) {
return 2;
} else if (stack.getRarity() == EnumRarity.EPIC) {
return 3;
}
return 0;
}
示例6: OinkRawPorkchop
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
public OinkRawPorkchop(String name, EnumRarity rarity, int amount, float saturation, boolean isWolfFood) {
super(amount, saturation, isWolfFood);
this.name = name;
this.rarity = rarity;
this.setUnlocalizedName(name);
this.setRegistryName(name);
this.setCreativeTab(TheOink.CREATIVETAB);
this.setAlwaysEdible();
}
示例7: getRarity
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
@Override
public EnumRarity getRarity(ItemStack stack)
{
if (stack.hasTagCompound() && stack.getTagCompound().getBoolean("hasEmeraldMuzzle")) { return EnumRarity.rare; }
return EnumRarity.common; // Default
}
示例8: getGroupRarity
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
public EnumRarity getGroupRarity()
{
if( mRarity >= 0 && mRarity < EnumRarity.values().length )
return EnumRarity.values()[mRarity];
else
return EnumRarity.common;
}
示例9: getRarity
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
@Override
public EnumRarity getRarity(ItemStack stack) {
if(field_150939_a instanceof OTBlock){
return ((OTBlock) field_150939_a).getRarity();
}else{
return super.getRarity(stack);
}
}
示例10: getRarity
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
@Override
public EnumRarity getRarity(ItemStack stack) {
switch(stack.getItemDamage() % BlockWireless.nTransmitters) {
case 0:
return EnumRarity.UNCOMMON;
case 1:
return EnumRarity.RARE;
case 2:
return EnumRarity.EPIC;
default:
return super.getRarity(stack);
}
}
示例11: getRarity
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
@Override
public EnumRarity getRarity(ItemStack stack) {
switch(stack.getItemDamage()) {
case Ingot.ELEC:
return EnumRarity.UNCOMMON;
case Ingot.SKY:
return EnumRarity.RARE;
case Ingot.MYSTIC:
return EnumRarity.EPIC;
default:
return super.getRarity(stack);
}
}
示例12: getRarity
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
@Override
@SideOnly(Side.CLIENT)
public EnumRarity getRarity(ItemStack stack) {
int type = stack.getItemDamage();
if(type == Material.ICHOR || type == Material.DIVINE_DUST) {
return EnumRarity.EPIC;
} else if(type >= Material.DEMON_BLOOD) {
return EnumRarity.RARE;
} else {
return EnumRarity.COMMON;
}
}
示例13: getRarity
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
@Override
public EnumRarity getRarity(ItemStack stack) {
if(stack.getItemDamage() == 1) {
return EnumRarity.RARE;
} else {
return EnumRarity.UNCOMMON;
}
}
示例14: getRarity
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
@Override
public EnumRarity getRarity(ItemStack stack)
{
if (stack.hasTagCompound())
return QBarOres.getMineralFromName(stack.getTagCompound().getString("ore")).get().getRarity();
return EnumRarity.COMMON;
}
示例15: getRarity
import net.minecraft.item.EnumRarity; //導入依賴的package包/類
@Override
public EnumRarity getRarity(ItemStack stack) {
switch(stack.getItemDamage()) {
case 2:
return EnumRarity.EPIC;
default:
return EnumRarity.RARE;
}
}