本文整理匯總了Java中net.minecraft.item.EnumRarity.UNCOMMON屬性的典型用法代碼示例。如果您正苦於以下問題:Java EnumRarity.UNCOMMON屬性的具體用法?Java EnumRarity.UNCOMMON怎麽用?Java EnumRarity.UNCOMMON使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類net.minecraft.item.EnumRarity
的用法示例。
在下文中一共展示了EnumRarity.UNCOMMON屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getRarity
@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;
}
示例2: getRarity
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;
}
示例3: getRarityFromStack
/** Get the rarity from an ItemStack */
public static EnumRarity getRarityFromStack(ItemStack stack) {
if(stack == null) return EnumRarity.COMMON;
if(ItemStack.areItemStacksEqual(stack, new ItemStack(LCItems.ingot, 1, Ingot.ELEC))) {
return EnumRarity.UNCOMMON;
} else if(ItemStack.areItemStacksEqual(stack, new ItemStack(LCItems.ingot, 1, Ingot.SKY))) {
return EnumRarity.RARE;
} else if(ItemStack.areItemStacksEqual(stack, new ItemStack(LCItems.ingot, 1, Ingot.MYSTIC))) {
return EnumRarity.EPIC;
} else {
return EnumRarity.COMMON;
}
}
示例4: getRarity
@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);
}
}
示例5: getRarity
@Override
public EnumRarity getRarity(ItemStack stack) {
if(stack.getItemDamage() == 1) {
return EnumRarity.RARE;
} else {
return EnumRarity.UNCOMMON;
}
}
示例6: getRarity
@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);
}
}
示例7: getRarity
@Override
public EnumRarity getRarity(ItemStack stack) {
switch(stack.getItemDamage()) {
case Rod.ELEC:
return EnumRarity.UNCOMMON;
case Rod.SKY:
return EnumRarity.RARE;
case Rod.MYSTIC:
return EnumRarity.EPIC;
default:
return super.getRarity(stack);
}
}
示例8: getRarity
@Override
public EnumRarity getRarity(ItemStack stack) {
switch(stack.getItemDamage()) {
case BlockUnderTNT.MYSTIC:
return EnumRarity.EPIC;
case BlockUnderTNT.LIGHTNING:
return EnumRarity.RARE;
default:
return EnumRarity.UNCOMMON;
}
}
示例9: getRarity
@Override
public EnumRarity getRarity(ItemStack stack) {
switch(stack.getItemDamage()) {
case 1:
return EnumRarity.UNCOMMON;
case 2:
return EnumRarity.RARE;
default:
return EnumRarity.COMMON;
}
}
示例10: getRarity
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.UNCOMMON;
}
示例11: getRarity
@Override
@SideOnly(Side.CLIENT)
public EnumRarity getRarity(ItemStack var1)
{
return EnumRarity.UNCOMMON;
}
示例12: getRarity
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.UNCOMMON;
}
示例13: getRarity
@Override
public EnumRarity getRarity(ItemStack stack)
{
return EnumRarity.UNCOMMON;
}
示例14: getItemClassArgs
@Override
public Object[] getItemClassArgs() {
return new Object[]{EnumRarity.UNCOMMON};
}
示例15: ItemBlockCoFH
public ItemBlockCoFH(Block block) {
super(block, EnumRarity.UNCOMMON);
this.block = (BlockCoFH)block;
}