枚举 Enchantment.Rarity
- java.lang.Object
-
- java.lang.Enum<Enchantment.Rarity>
-
- net.minecraft.enchantment.Enchantment.Rarity
-
- 所有已实现的接口:
Serializable,Comparable<Enchantment.Rarity>
- 封闭类:
- Enchantment
public static enum Enchantment.Rarity extends Enum<Enchantment.Rarity>
The rarity is an attribute of an enchantment.It affects the chance of getting an enchantment from enchanting or loots as well as the combination cost in anvil.
- Mappings:
Namespace Name official btl$aintermediary net/minecraft/class_1887$class_1888named net/minecraft/enchantment/Enchantment$Rarity
-
-
字段概要
字段 修饰符和类型 字段 说明 private intweight
-
构造器概要
构造器 限定符 构造器 说明 privateRarity(int weight)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 intgetWeight()Returns the weight of an enchantment in weighted pickers.static Enchantment.RarityvalueOf(String name)返回带有指定名称的该类型的枚举常量。static Enchantment.Rarity[]values()按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
-
-
-
枚举常量详细资料
-
COMMON
public static final Enchantment.Rarity COMMON
- Mappings:
Namespace Name Mixin selector official aLbtl$a;a:Lbtl$a;intermediary field_9087Lnet/minecraft/class_1887$class_1888;field_9087:Lnet/minecraft/class_1887$class_1888;named COMMONLnet/minecraft/enchantment/Enchantment$Rarity;COMMON:Lnet/minecraft/enchantment/Enchantment$Rarity;
-
UNCOMMON
public static final Enchantment.Rarity UNCOMMON
- Mappings:
Namespace Name Mixin selector official bLbtl$a;b:Lbtl$a;intermediary field_9090Lnet/minecraft/class_1887$class_1888;field_9090:Lnet/minecraft/class_1887$class_1888;named UNCOMMONLnet/minecraft/enchantment/Enchantment$Rarity;UNCOMMON:Lnet/minecraft/enchantment/Enchantment$Rarity;
-
RARE
public static final Enchantment.Rarity RARE
- Mappings:
Namespace Name Mixin selector official cLbtl$a;c:Lbtl$a;intermediary field_9088Lnet/minecraft/class_1887$class_1888;field_9088:Lnet/minecraft/class_1887$class_1888;named RARELnet/minecraft/enchantment/Enchantment$Rarity;RARE:Lnet/minecraft/enchantment/Enchantment$Rarity;
-
VERY_RARE
public static final Enchantment.Rarity VERY_RARE
- Mappings:
Namespace Name Mixin selector official dLbtl$a;d:Lbtl$a;intermediary field_9091Lnet/minecraft/class_1887$class_1888;field_9091:Lnet/minecraft/class_1887$class_1888;named VERY_RARELnet/minecraft/enchantment/Enchantment$Rarity;VERY_RARE:Lnet/minecraft/enchantment/Enchantment$Rarity;
-
-
构造器详细资料
-
Rarity
private Rarity(int weight)
- Mappings:
Namespace Name Mixin selector official <init>Lbtl$a;<init>(Ljava/lang/String;II)Vintermediary <init>Lnet/minecraft/class_1887$class_1888;<init>(Ljava/lang/String;II)Vnamed <init>Lnet/minecraft/enchantment/Enchantment$Rarity;<init>(Ljava/lang/String;II)V
-
-
方法详细资料
-
values
public static Enchantment.Rarity[] values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:for (Enchantment.Rarity c : Enchantment.Rarity.values()) System.out.println(c);
- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
public static Enchantment.Rarity valueOf(String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- 如果该枚举类型没有带有指定名称的常量NullPointerException- 如果参数为空值
-
getWeight
public int getWeight()
Returns the weight of an enchantment in weighted pickers.- Mappings:
Namespace Name Mixin selector official aLbtl$a;a()Iintermediary method_8197Lnet/minecraft/class_1887$class_1888;method_8197()Inamed getWeightLnet/minecraft/enchantment/Enchantment$Rarity;getWeight()I
-
-