Package net.minecraft.world
Enum Class Difficulty
- All Implemented Interfaces:
Serializable,Comparable<Difficulty>,Constable,StringIdentifiable
- Mappings:
Namespace Name official bdtintermediary 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>>Nested classes/interfaces inherited from interface net.minecraft.util.StringIdentifiable
StringIdentifiable.Codec<E extends Enum<E> & StringIdentifiable> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final IntFunction<Difficulty>static final StringIdentifiable.Codec<Difficulty>private final intprivate final StringFields inherited from interface net.minecraft.util.StringIdentifiable
field_38377 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasString()Returns the unique string representation of the enum, used for serialization.static DifficultybyId(int id) static @Nullable DifficultyintgetId()getInfo()getName()static DifficultyReturns the enum constant of this class with the specified name.static Difficulty[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PEACEFUL
- Mappings:
Namespace Name Mixin selector official aLbdt;a:Lbdt;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 bLbdt;b:Lbdt;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 cLbdt;c:Lbdt;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 dLbdt;d:Lbdt;intermediary field_5807Lnet/minecraft/class_1267;field_5807:Lnet/minecraft/class_1267;named HARDLnet/minecraft/world/Difficulty;HARD:Lnet/minecraft/world/Difficulty;
-
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector official eLbdt;e:Lapr$a;intermediary field_41668Lnet/minecraft/class_1267;field_41668:Lnet/minecraft/class_3542$class_7292;named CODECLnet/minecraft/world/Difficulty;CODEC:Lnet/minecraft/util/StringIdentifiable$Codec;
-
BY_ID
- Mappings:
Namespace Name Mixin selector official fLbdt;f:Ljava/util/function/IntFunction;intermediary field_5800Lnet/minecraft/class_1267;field_5800:Ljava/util/function/IntFunction;named BY_IDLnet/minecraft/world/Difficulty;BY_ID:Ljava/util/function/IntFunction;
-
id
private final int id- Mappings:
Namespace Name Mixin selector official gLbdt;g:Iintermediary field_5803Lnet/minecraft/class_1267;field_5803:Inamed idLnet/minecraft/world/Difficulty;id:I
-
name
- Mappings:
Namespace Name Mixin selector official hLbdt;h: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>Lbdt;<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 class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getId
public int getId()- Mappings:
Namespace Name Mixin selector official aLbdt;a()Iintermediary method_5461Lnet/minecraft/class_1267;method_5461()Inamed getIdLnet/minecraft/world/Difficulty;getId()I
-
getTranslatableName
- Mappings:
Namespace Name Mixin selector official bLbdt;b()Lsw;intermediary method_5463Lnet/minecraft/class_1267;method_5463()Lnet/minecraft/class_2561;named getTranslatableNameLnet/minecraft/world/Difficulty;getTranslatableName()Lnet/minecraft/text/Text;
-
getInfo
- Mappings:
Namespace Name Mixin selector official dLbdt;d()Lsw;intermediary method_48556Lnet/minecraft/class_1267;method_48556()Lnet/minecraft/class_2561;named getInfoLnet/minecraft/world/Difficulty;getInfo()Lnet/minecraft/text/Text;
-
byId
- Mappings:
Namespace Name Mixin selector official aLbdt;a(I)Lbdt;intermediary method_5462Lnet/minecraft/class_1267;method_5462(I)Lnet/minecraft/class_1267;named byIdLnet/minecraft/world/Difficulty;byId(I)Lnet/minecraft/world/Difficulty;
-
byName
- Mappings:
Namespace Name Mixin selector official aLbdt;a(Ljava/lang/String;)Lbdt;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 eLbdt;e()Ljava/lang/String;intermediary method_5460Lnet/minecraft/class_1267;method_5460()Ljava/lang/String;named getNameLnet/minecraft/world/Difficulty;getName()Ljava/lang/String;
-
asString
Returns the unique string representation of the enum, used for serialization.- Specified by:
asStringin interfaceStringIdentifiable- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector official cLapr;c()Ljava/lang/String;intermediary method_15434Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;named asStringLnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
-