Package net.minecraft.world
Enum Class GameMode
- All Implemented Interfaces:
Serializable
,Comparable<GameMode>
,Constable
,StringIdentifiable
- Mappings:
Namespace Name named net/minecraft/world/GameMode
intermediary net/minecraft/class_1934
official dcr
-
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.BasicCodec<S extends StringIdentifiable>, StringIdentifiable.EnumCodec<E extends Enum<E> & StringIdentifiable>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final IntFunction
<GameMode> static final StringIdentifiable.EnumCodec
<GameMode> static final GameMode
private final int
private final String
private final Text
private final Text
private static final int
Fields inherited from interface net.minecraft.util.StringIdentifiable
CACHED_MAP_THRESHOLD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasString()
Returns the unique string representation of the enum, used for serialization.static GameMode
byId
(int id) static GameMode
int
getId()
static int
getName()
getOrNull
(int id) boolean
boolean
boolean
void
setAbilities
(PlayerAbilities abilities) static GameMode
Returns the enum constant of this class with the specified name.static GameMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SURVIVAL
- Mappings:
Namespace Name Mixin selector named SURVIVAL
Lnet/minecraft/world/GameMode;SURVIVAL:Lnet/minecraft/world/GameMode;
intermediary field_9215
Lnet/minecraft/class_1934;field_9215:Lnet/minecraft/class_1934;
official a
Ldcr;a:Ldcr;
-
CREATIVE
- Mappings:
Namespace Name Mixin selector named CREATIVE
Lnet/minecraft/world/GameMode;CREATIVE:Lnet/minecraft/world/GameMode;
intermediary field_9220
Lnet/minecraft/class_1934;field_9220:Lnet/minecraft/class_1934;
official b
Ldcr;b:Ldcr;
-
ADVENTURE
- Mappings:
Namespace Name Mixin selector named ADVENTURE
Lnet/minecraft/world/GameMode;ADVENTURE:Lnet/minecraft/world/GameMode;
intermediary field_9216
Lnet/minecraft/class_1934;field_9216:Lnet/minecraft/class_1934;
official c
Ldcr;c:Ldcr;
-
SPECTATOR
- Mappings:
Namespace Name Mixin selector named SPECTATOR
Lnet/minecraft/world/GameMode;SPECTATOR:Lnet/minecraft/world/GameMode;
intermediary field_9219
Lnet/minecraft/class_1934;field_9219:Lnet/minecraft/class_1934;
official d
Ldcr;d:Ldcr;
-
-
Field Details
-
DEFAULT
- Mappings:
Namespace Name Mixin selector named DEFAULT
Lnet/minecraft/world/GameMode;DEFAULT:Lnet/minecraft/world/GameMode;
intermediary field_28045
Lnet/minecraft/class_1934;field_28045:Lnet/minecraft/class_1934;
official e
Ldcr;e:Ldcr;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/world/GameMode;CODEC:Lnet/minecraft/util/StringIdentifiable$EnumCodec;
intermediary field_41676
Lnet/minecraft/class_1934;field_41676:Lnet/minecraft/class_3542$class_7292;
official f
Ldcr;f:Lazj$a;
-
BY_ID
- Mappings:
Namespace Name Mixin selector named BY_ID
Lnet/minecraft/world/GameMode;BY_ID:Ljava/util/function/IntFunction;
intermediary field_41677
Lnet/minecraft/class_1934;field_41677:Ljava/util/function/IntFunction;
official g
Ldcr;g:Ljava/util/function/IntFunction;
-
UNKNOWN
private static final int UNKNOWN- See Also:
- Mappings:
Namespace Name Mixin selector named UNKNOWN
Lnet/minecraft/world/GameMode;UNKNOWN:I
intermediary field_30964
Lnet/minecraft/class_1934;field_30964:I
official h
Ldcr;h:I
-
id
private final int id- Mappings:
Namespace Name Mixin selector named id
Lnet/minecraft/world/GameMode;id:I
intermediary field_9217
Lnet/minecraft/class_1934;field_9217:I
official i
Ldcr;i:I
-
name
- Mappings:
Namespace Name Mixin selector named name
Lnet/minecraft/world/GameMode;name:Ljava/lang/String;
intermediary field_9221
Lnet/minecraft/class_1934;field_9221:Ljava/lang/String;
official j
Ldcr;j:Ljava/lang/String;
-
simpleTranslatableName
- Mappings:
Namespace Name Mixin selector named simpleTranslatableName
Lnet/minecraft/world/GameMode;simpleTranslatableName:Lnet/minecraft/text/Text;
intermediary field_28046
Lnet/minecraft/class_1934;field_28046:Lnet/minecraft/class_2561;
official k
Ldcr;k:Lwy;
-
translatableName
- Mappings:
Namespace Name Mixin selector named translatableName
Lnet/minecraft/world/GameMode;translatableName:Lnet/minecraft/text/Text;
intermediary field_28047
Lnet/minecraft/class_1934;field_28047:Lnet/minecraft/class_2561;
official l
Ldcr;l:Lwy;
-
-
Constructor Details
-
GameMode
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/world/GameMode;<init>(Ljava/lang/String;IILjava/lang/String;)V
intermediary <init>
Lnet/minecraft/class_1934;<init>(Ljava/lang/String;IILjava/lang/String;)V
official <init>
Ldcr;<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 named getId
Lnet/minecraft/world/GameMode;getId()I
intermediary method_8379
Lnet/minecraft/class_1934;method_8379()I
official a
Ldcr;a()I
-
getName
- Mappings:
Namespace Name Mixin selector named getName
Lnet/minecraft/world/GameMode;getName()Ljava/lang/String;
intermediary method_8381
Lnet/minecraft/class_1934;method_8381()Ljava/lang/String;
official b
Ldcr;b()Ljava/lang/String;
-
asString
Returns the unique string representation of the enum, used for serialization.- Specified by:
asString
in interfaceStringIdentifiable
- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector named asString
Lnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
intermediary method_15434
Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;
official c
Lazj;c()Ljava/lang/String;
-
getTranslatableName
- Mappings:
Namespace Name Mixin selector named getTranslatableName
Lnet/minecraft/world/GameMode;getTranslatableName()Lnet/minecraft/text/Text;
intermediary method_8383
Lnet/minecraft/class_1934;method_8383()Lnet/minecraft/class_2561;
official d
Ldcr;d()Lwy;
-
getSimpleTranslatableName
- Mappings:
Namespace Name Mixin selector named getSimpleTranslatableName
Lnet/minecraft/world/GameMode;getSimpleTranslatableName()Lnet/minecraft/text/Text;
intermediary method_32763
Lnet/minecraft/class_1934;method_32763()Lnet/minecraft/class_2561;
official e
Ldcr;e()Lwy;
-
setAbilities
- Mappings:
Namespace Name Mixin selector named setAbilities
Lnet/minecraft/world/GameMode;setAbilities(Lnet/minecraft/entity/player/PlayerAbilities;)V
intermediary method_8382
Lnet/minecraft/class_1934;method_8382(Lnet/minecraft/class_1656;)V
official a
Ldcr;a(Lcms;)V
-
isBlockBreakingRestricted
public boolean isBlockBreakingRestricted()- Mappings:
Namespace Name Mixin selector named isBlockBreakingRestricted
Lnet/minecraft/world/GameMode;isBlockBreakingRestricted()Z
intermediary method_8387
Lnet/minecraft/class_1934;method_8387()Z
official f
Ldcr;f()Z
-
isCreative
public boolean isCreative()- Mappings:
Namespace Name Mixin selector named isCreative
Lnet/minecraft/world/GameMode;isCreative()Z
intermediary method_8386
Lnet/minecraft/class_1934;method_8386()Z
official g
Ldcr;g()Z
-
isSurvivalLike
public boolean isSurvivalLike()- Mappings:
Namespace Name Mixin selector named isSurvivalLike
Lnet/minecraft/world/GameMode;isSurvivalLike()Z
intermediary method_8388
Lnet/minecraft/class_1934;method_8388()Z
official h
Ldcr;h()Z
-
byId
- Mappings:
Namespace Name Mixin selector named byId
Lnet/minecraft/world/GameMode;byId(I)Lnet/minecraft/world/GameMode;
intermediary method_8384
Lnet/minecraft/class_1934;method_8384(I)Lnet/minecraft/class_1934;
official a
Ldcr;a(I)Ldcr;
-
byName
- Mappings:
Namespace Name Mixin selector named byName
Lnet/minecraft/world/GameMode;byName(Ljava/lang/String;)Lnet/minecraft/world/GameMode;
intermediary method_8385
Lnet/minecraft/class_1934;method_8385(Ljava/lang/String;)Lnet/minecraft/class_1934;
official a
Ldcr;a(Ljava/lang/String;)Ldcr;
-
byName
@Contract("_,!null->!null;_,null->_") @Nullable public static @Nullable GameMode byName(String name, @Nullable @Nullable GameMode defaultMode) - Mappings:
Namespace Name Mixin selector named byName
Lnet/minecraft/world/GameMode;byName(Ljava/lang/String;Lnet/minecraft/world/GameMode;)Lnet/minecraft/world/GameMode;
intermediary method_8378
Lnet/minecraft/class_1934;method_8378(Ljava/lang/String;Lnet/minecraft/class_1934;)Lnet/minecraft/class_1934;
official a
Ldcr;a(Ljava/lang/String;Ldcr;)Ldcr;
-
getId
- Mappings:
Namespace Name Mixin selector named getId
Lnet/minecraft/world/GameMode;getId(Lnet/minecraft/world/GameMode;)I
intermediary method_32761
Lnet/minecraft/class_1934;method_32761(Lnet/minecraft/class_1934;)I
official a
Ldcr;a(Ldcr;)I
-
getOrNull
- Mappings:
Namespace Name Mixin selector named getOrNull
Lnet/minecraft/world/GameMode;getOrNull(I)Lnet/minecraft/world/GameMode;
intermediary method_32762
Lnet/minecraft/class_1934;method_32762(I)Lnet/minecraft/class_1934;
official b
Ldcr;b(I)Ldcr;
-