Package net.minecraft.world
Enum Class GameMode
- All Implemented Interfaces:
Serializable,Comparable<GameMode>,Constable,StringIdentifiable
- Mappings:
Namespace Name named net/minecraft/world/GameModeintermediary net/minecraft/class_1934official dwl
-
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
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringIdentifiable.EnumCodec<GameMode> static final GameModeprivate final Stringprivate final intstatic final com.mojang.serialization.Codec<GameMode> Deprecated.private static final IntFunction<GameMode> static final PacketCodec<ByteBuf, GameMode> private final Textprivate final Textprivate static final intFields inherited from interface net.minecraft.util.StringIdentifiable
CACHED_MAP_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasString()Returns the unique string representation of the enum, used for serialization.static GameModestatic @Nullable GameModestatic GameModebyIndex(int index) getId()static intintgetIndex()static @Nullable GameModegetOrNull(int index) booleanbooleanbooleanstatic booleanisValid(int index) voidsetAbilities(PlayerAbilities abilities) static GameModeReturns 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 SURVIVALLnet/minecraft/world/GameMode;SURVIVAL:Lnet/minecraft/world/GameMode;intermediary field_9215Lnet/minecraft/class_1934;field_9215:Lnet/minecraft/class_1934;official aLdwl;a:Ldwl;
-
CREATIVE
- Mappings:
Namespace Name Mixin selector named CREATIVELnet/minecraft/world/GameMode;CREATIVE:Lnet/minecraft/world/GameMode;intermediary field_9220Lnet/minecraft/class_1934;field_9220:Lnet/minecraft/class_1934;official bLdwl;b:Ldwl;
-
ADVENTURE
- Mappings:
Namespace Name Mixin selector named ADVENTURELnet/minecraft/world/GameMode;ADVENTURE:Lnet/minecraft/world/GameMode;intermediary field_9216Lnet/minecraft/class_1934;field_9216:Lnet/minecraft/class_1934;official cLdwl;c:Ldwl;
-
SPECTATOR
- Mappings:
Namespace Name Mixin selector named SPECTATORLnet/minecraft/world/GameMode;SPECTATOR:Lnet/minecraft/world/GameMode;intermediary field_9219Lnet/minecraft/class_1934;field_9219:Lnet/minecraft/class_1934;official dLdwl;d:Ldwl;
-
-
Field Details
-
DEFAULT
- Mappings:
Namespace Name Mixin selector named DEFAULTLnet/minecraft/world/GameMode;DEFAULT:Lnet/minecraft/world/GameMode;intermediary field_28045Lnet/minecraft/class_1934;field_28045:Lnet/minecraft/class_1934;official eLdwl;e:Ldwl;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/world/GameMode;CODEC:Lnet/minecraft/util/StringIdentifiable$EnumCodec;intermediary field_41676Lnet/minecraft/class_1934;field_41676:Lnet/minecraft/class_3542$class_7292;official fLdwl;f:Lbhh$a;
-
INDEX_MAPPER
- Mappings:
Namespace Name Mixin selector named INDEX_MAPPERLnet/minecraft/world/GameMode;INDEX_MAPPER:Ljava/util/function/IntFunction;intermediary field_41677Lnet/minecraft/class_1934;field_41677:Ljava/util/function/IntFunction;official iLdwl;i:Ljava/util/function/IntFunction;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/world/GameMode;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_60671Lnet/minecraft/class_1934;field_60671:Lnet/minecraft/class_9139;official gLdwl;g:Laao;
-
INDEX_CODEC
Deprecated.- Mappings:
Namespace Name Mixin selector named INDEX_CODECLnet/minecraft/world/GameMode;INDEX_CODEC:Lcom/mojang/serialization/Codec;intermediary field_56668Lnet/minecraft/class_1934;field_56668:Lcom/mojang/serialization/Codec;official hLdwl;h:Lcom/mojang/serialization/Codec;
-
UNKNOWN
private static final int UNKNOWN- See Also:
- Mappings:
Namespace Name Mixin selector named UNKNOWNLnet/minecraft/world/GameMode;UNKNOWN:Iintermediary field_30964Lnet/minecraft/class_1934;field_30964:Iofficial jLdwl;j:I
-
index
private final int index- Mappings:
Namespace Name Mixin selector named indexLnet/minecraft/world/GameMode;index:Iintermediary field_9217Lnet/minecraft/class_1934;field_9217:Iofficial kLdwl;k:I
-
id
- Mappings:
Namespace Name Mixin selector named idLnet/minecraft/world/GameMode;id:Ljava/lang/String;intermediary field_9221Lnet/minecraft/class_1934;field_9221:Ljava/lang/String;official lLdwl;l:Ljava/lang/String;
-
simpleTranslatableName
- Mappings:
Namespace Name Mixin selector named simpleTranslatableNameLnet/minecraft/world/GameMode;simpleTranslatableName:Lnet/minecraft/text/Text;intermediary field_28046Lnet/minecraft/class_1934;field_28046:Lnet/minecraft/class_2561;official mLdwl;m:Lyh;
-
translatableName
- Mappings:
Namespace Name Mixin selector named translatableNameLnet/minecraft/world/GameMode;translatableName:Lnet/minecraft/text/Text;intermediary field_28047Lnet/minecraft/class_1934;field_28047:Lnet/minecraft/class_2561;official nLdwl;n:Lyh;
-
-
Constructor Details
-
GameMode
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/world/GameMode;<init>(Ljava/lang/String;IILjava/lang/String;)Vintermediary <init>Lnet/minecraft/class_1934;<init>(Ljava/lang/String;IILjava/lang/String;)Vofficial <init>Ldwl;<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
-
getIndex
public int getIndex()- Mappings:
Namespace Name Mixin selector named getIndexLnet/minecraft/world/GameMode;getIndex()Iintermediary method_8379Lnet/minecraft/class_1934;method_8379()Iofficial aLdwl;a()I
-
getId
- Mappings:
Namespace Name Mixin selector named getIdLnet/minecraft/world/GameMode;getId()Ljava/lang/String;intermediary method_8381Lnet/minecraft/class_1934;method_8381()Ljava/lang/String;official bLdwl;b()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 named asStringLnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;intermediary method_15434Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;official cLbhh;c()Ljava/lang/String;
-
getTranslatableName
- Mappings:
Namespace Name Mixin selector named getTranslatableNameLnet/minecraft/world/GameMode;getTranslatableName()Lnet/minecraft/text/Text;intermediary method_8383Lnet/minecraft/class_1934;method_8383()Lnet/minecraft/class_2561;official dLdwl;d()Lyh;
-
getSimpleTranslatableName
- Mappings:
Namespace Name Mixin selector named getSimpleTranslatableNameLnet/minecraft/world/GameMode;getSimpleTranslatableName()Lnet/minecraft/text/Text;intermediary method_32763Lnet/minecraft/class_1934;method_32763()Lnet/minecraft/class_2561;official eLdwl;e()Lyh;
-
setAbilities
- Mappings:
Namespace Name Mixin selector named setAbilitiesLnet/minecraft/world/GameMode;setAbilities(Lnet/minecraft/entity/player/PlayerAbilities;)Vintermediary method_8382Lnet/minecraft/class_1934;method_8382(Lnet/minecraft/class_1656;)Vofficial aLdwl;a(Lddi;)V
-
isBlockBreakingRestricted
public boolean isBlockBreakingRestricted()- Mappings:
Namespace Name Mixin selector named isBlockBreakingRestrictedLnet/minecraft/world/GameMode;isBlockBreakingRestricted()Zintermediary method_8387Lnet/minecraft/class_1934;method_8387()Zofficial fLdwl;f()Z
-
isCreative
public boolean isCreative()- Mappings:
Namespace Name Mixin selector named isCreativeLnet/minecraft/world/GameMode;isCreative()Zintermediary method_8386Lnet/minecraft/class_1934;method_8386()Zofficial gLdwl;g()Z
-
isSurvivalLike
public boolean isSurvivalLike()- Mappings:
Namespace Name Mixin selector named isSurvivalLikeLnet/minecraft/world/GameMode;isSurvivalLike()Zintermediary method_8388Lnet/minecraft/class_1934;method_8388()Zofficial hLdwl;h()Z
-
byIndex
- Mappings:
Namespace Name Mixin selector named byIndexLnet/minecraft/world/GameMode;byIndex(I)Lnet/minecraft/world/GameMode;intermediary method_8384Lnet/minecraft/class_1934;method_8384(I)Lnet/minecraft/class_1934;official aLdwl;a(I)Ldwl;
-
byId
- Mappings:
Namespace Name Mixin selector named byIdLnet/minecraft/world/GameMode;byId(Ljava/lang/String;)Lnet/minecraft/world/GameMode;intermediary method_8385Lnet/minecraft/class_1934;method_8385(Ljava/lang/String;)Lnet/minecraft/class_1934;official aLdwl;a(Ljava/lang/String;)Ldwl;
-
byId
@Contract("_,!null->!null;_,null->_") public static @Nullable GameMode byId(String id, @Nullable GameMode fallback) - Mappings:
Namespace Name Mixin selector named byIdLnet/minecraft/world/GameMode;byId(Ljava/lang/String;Lnet/minecraft/world/GameMode;)Lnet/minecraft/world/GameMode;intermediary method_8378Lnet/minecraft/class_1934;method_8378(Ljava/lang/String;Lnet/minecraft/class_1934;)Lnet/minecraft/class_1934;official aLdwl;a(Ljava/lang/String;Ldwl;)Ldwl;
-
getId
- Mappings:
Namespace Name Mixin selector named getIdLnet/minecraft/world/GameMode;getId(Lnet/minecraft/world/GameMode;)Iintermediary method_32761Lnet/minecraft/class_1934;method_32761(Lnet/minecraft/class_1934;)Iofficial aLdwl;a(Ldwl;)I
-
getOrNull
- Mappings:
Namespace Name Mixin selector named getOrNullLnet/minecraft/world/GameMode;getOrNull(I)Lnet/minecraft/world/GameMode;intermediary method_32762Lnet/minecraft/class_1934;method_32762(I)Lnet/minecraft/class_1934;official bLdwl;b(I)Ldwl;
-
isValid
public static boolean isValid(int index) - Mappings:
Namespace Name Mixin selector named isValidLnet/minecraft/world/GameMode;isValid(I)Zintermediary method_64760Lnet/minecraft/class_1934;method_64760(I)Zofficial cLdwl;c(I)Z
-