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 aqgintermediary net/minecraft/class_1267named 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[]BY_NAMEprivate intidprivate Stringname -
Constructor Summary
Constructors Modifier Constructor Description privateDifficulty(int id, String name) -
Method Summary
Modifier and Type Method Description static @Nullable DifficultybyName(String name)static DifficultybyOrdinal(int ordinal)intgetId()StringgetName()TextgetTranslatableName()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 aLaqg;a:Laqg;intermediary field_5801Lnet/minecraft/class_1267;field_5801:Lnet/minecraft/class_1267;named PEACEFULLnet/minecraft/world/Difficulty;PEACEFUL:Lnet/minecraft/world/Difficulty;
-
EASY
- Mappings:
Namespace Name Mixin selector official bLaqg;b:Laqg;intermediary field_5805Lnet/minecraft/class_1267;field_5805:Lnet/minecraft/class_1267;named EASYLnet/minecraft/world/Difficulty;EASY:Lnet/minecraft/world/Difficulty;
-
NORMAL
- Mappings:
Namespace Name Mixin selector official cLaqg;c:Laqg;intermediary field_5802Lnet/minecraft/class_1267;field_5802:Lnet/minecraft/class_1267;named NORMALLnet/minecraft/world/Difficulty;NORMAL:Lnet/minecraft/world/Difficulty;
-
HARD
- Mappings:
Namespace Name Mixin selector official dLaqg;d:Laqg;intermediary field_5807Lnet/minecraft/class_1267;field_5807:Lnet/minecraft/class_1267;named HARDLnet/minecraft/world/Difficulty;HARD:Lnet/minecraft/world/Difficulty;
-
-
Field Details
-
BY_NAME
- Mappings:
Namespace Name Mixin selector official eLaqg;e:[Laqg;intermediary field_5800Lnet/minecraft/class_1267;field_5800:[Lnet/minecraft/class_1267;named BY_NAMELnet/minecraft/world/Difficulty;BY_NAME:[Lnet/minecraft/world/Difficulty;
-
id
private final int id- Mappings:
Namespace Name Mixin selector official fLaqg;f:Iintermediary field_5803Lnet/minecraft/class_1267;field_5803:Inamed idLnet/minecraft/world/Difficulty;id:I
-
name
- Mappings:
Namespace Name Mixin selector official gLaqg;g:Ljava/lang/String;intermediary field_5806Lnet/minecraft/class_1267;field_5806:Ljava/lang/String;named nameLnet/minecraft/world/Difficulty;name:Ljava/lang/String;
-
-
Constructor Details
-
Difficulty
- Mappings:
Namespace Name Mixin selector official <init>Laqg;<init>(Ljava/lang/String;IILjava/lang/String;)Vintermediary <init>Lnet/minecraft/class_1267;<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 aLaqg;a()Iintermediary method_5461Lnet/minecraft/class_1267;method_5461()Inamed getIdLnet/minecraft/world/Difficulty;getId()I
-
getTranslatableName
- Mappings:
Namespace Name Mixin selector official bLaqg;b()Loj;intermediary method_5463Lnet/minecraft/class_1267;method_5463()Lnet/minecraft/class_2561;named getTranslatableNameLnet/minecraft/world/Difficulty;getTranslatableName()Lnet/minecraft/text/Text;
-
byOrdinal
- Mappings:
Namespace Name Mixin selector official aLaqg;a(I)Laqg;intermediary method_5462Lnet/minecraft/class_1267;method_5462(I)Lnet/minecraft/class_1267;named byOrdinalLnet/minecraft/world/Difficulty;byOrdinal(I)Lnet/minecraft/world/Difficulty;
-
byName
- Mappings:
Namespace Name Mixin selector official aLaqg;a(Ljava/lang/String;)Laqg;intermediary method_16691Lnet/minecraft/class_1267;method_16691(Ljava/lang/String;)Lnet/minecraft/class_1267;named byNameLnet/minecraft/world/Difficulty;byName(Ljava/lang/String;)Lnet/minecraft/world/Difficulty;
-
getName
- Mappings:
Namespace Name Mixin selector official cLaqg;c()Ljava/lang/String;intermediary method_5460Lnet/minecraft/class_1267;method_5460()Ljava/lang/String;named getNameLnet/minecraft/world/Difficulty;getName()Ljava/lang/String;
-