Package net.minecraft.world
Enum Difficulty
- All Implemented Interfaces:
Serializable,Comparable<Difficulty>,java.lang.constant.Constable
public enum Difficulty extends Enum<Difficulty>
- Mappings:
Namespace Name official ojintermediary net/minecraft/class_1721named net/minecraft/world/Difficulty
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description private static Difficulty[]DIFFICULTIESprivate intidprivate Stringname -
Constructor Summary
Constructors Modifier Constructor Description privateDifficulty(int id, String name) -
Method Summary
Modifier and Type Method Description static DifficultybyOrdinal(int ordinal)intgetId()StringgetName()static DifficultyvalueOf(String name)Returns the enum constant of this type with the specified name.static Difficulty[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PEACEFUL
- Mappings:
Namespace Name Mixin selector official aLoj;a:Loj;intermediary field_7204Lnet/minecraft/class_1721;field_7204:Lnet/minecraft/class_1721;named PEACEFULLnet/minecraft/world/Difficulty;PEACEFUL:Lnet/minecraft/world/Difficulty;
-
EASY
- Mappings:
Namespace Name Mixin selector official bLoj;b:Loj;intermediary field_7205Lnet/minecraft/class_1721;field_7205:Lnet/minecraft/class_1721;named EASYLnet/minecraft/world/Difficulty;EASY:Lnet/minecraft/world/Difficulty;
-
NORMAL
- Mappings:
Namespace Name Mixin selector official cLoj;c:Loj;intermediary field_7206Lnet/minecraft/class_1721;field_7206:Lnet/minecraft/class_1721;named NORMALLnet/minecraft/world/Difficulty;NORMAL:Lnet/minecraft/world/Difficulty;
-
HARD
- Mappings:
Namespace Name Mixin selector official dLoj;d:Loj;intermediary field_7207Lnet/minecraft/class_1721;field_7207:Lnet/minecraft/class_1721;named HARDLnet/minecraft/world/Difficulty;HARD:Lnet/minecraft/world/Difficulty;
-
-
Field Details
-
DIFFICULTIES
- Mappings:
Namespace Name Mixin selector official eLoj;e:[Loj;intermediary field_7208Lnet/minecraft/class_1721;field_7208:[Lnet/minecraft/class_1721;named DIFFICULTIESLnet/minecraft/world/Difficulty;DIFFICULTIES:[Lnet/minecraft/world/Difficulty;
-
id
private final int id- Mappings:
Namespace Name Mixin selector official fLoj;f:Iintermediary field_7209Lnet/minecraft/class_1721;field_7209:Inamed idLnet/minecraft/world/Difficulty;id:I
-
name
- Mappings:
Namespace Name Mixin selector official gLoj;g:Ljava/lang/String;intermediary field_7210Lnet/minecraft/class_1721;field_7210:Ljava/lang/String;named nameLnet/minecraft/world/Difficulty;name:Ljava/lang/String;
-
-
Constructor Details
-
Difficulty
- Mappings:
Namespace Name Mixin selector official <init>Loj;<init>(Ljava/lang/String;IILjava/lang/String;)Vintermediary <init>Lnet/minecraft/class_1721;<init>(Ljava/lang/String;IILjava/lang/String;)Vnamed <init>Lnet/minecraft/world/Difficulty;<init>(Ljava/lang/String;IILjava/lang/String;)V
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getId
public int getId()- Mappings:
Namespace Name Mixin selector official aLoj;a()Iintermediary method_6755Lnet/minecraft/class_1721;method_6755()Inamed getIdLnet/minecraft/world/Difficulty;getId()I
-
byOrdinal
- Mappings:
Namespace Name Mixin selector official aLoj;a(I)Loj;intermediary method_6756Lnet/minecraft/class_1721;method_6756(I)Lnet/minecraft/class_1721;named byOrdinalLnet/minecraft/world/Difficulty;byOrdinal(I)Lnet/minecraft/world/Difficulty;
-
getName
- Mappings:
Namespace Name Mixin selector official bLoj;b()Ljava/lang/String;intermediary method_6757Lnet/minecraft/class_1721;method_6757()Ljava/lang/String;named getNameLnet/minecraft/world/Difficulty;getName()Ljava/lang/String;
-