Package net.minecraft.world
Enum GameMode
- All Implemented Interfaces:
Serializable,Comparable<GameMode>,java.lang.constant.Constable
public enum GameMode extends Enum<GameMode>
- Mappings:
Namespace Name official bunintermediary net/minecraft/class_1934named net/minecraft/world/GameMode
-
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 static GameModeDEFAULTprivate intidprivate Stringnameprivate TextsimpleTranslatableNameprivate TexttranslatableName -
Constructor Summary
-
Method Summary
Modifier and Type Method Description static GameModebyId(int id)static GameModebyId(int id, GameMode defaultMode)static GameModebyName(String name)static GameModebyName(String name, GameMode defaultMode)intgetId()static intgetId(@Nullable GameMode gameMode)StringgetName()static @Nullable GameModegetOrNull(int id)TextgetSimpleTranslatableName()TextgetTranslatableName()booleanisBlockBreakingRestricted()booleanisCreative()booleanisSurvivalLike()voidsetAbilities(PlayerAbilities abilities)static GameModevalueOf(String name)Returns the enum constant of this type with the specified name.static GameMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SURVIVAL
- Mappings:
Namespace Name Mixin selector official aLbun;a:Lbun;intermediary field_9215Lnet/minecraft/class_1934;field_9215:Lnet/minecraft/class_1934;named SURVIVALLnet/minecraft/world/GameMode;SURVIVAL:Lnet/minecraft/world/GameMode;
-
CREATIVE
- Mappings:
Namespace Name Mixin selector official bLbun;b:Lbun;intermediary field_9220Lnet/minecraft/class_1934;field_9220:Lnet/minecraft/class_1934;named CREATIVELnet/minecraft/world/GameMode;CREATIVE:Lnet/minecraft/world/GameMode;
-
ADVENTURE
- Mappings:
Namespace Name Mixin selector official cLbun;c:Lbun;intermediary field_9216Lnet/minecraft/class_1934;field_9216:Lnet/minecraft/class_1934;named ADVENTURELnet/minecraft/world/GameMode;ADVENTURE:Lnet/minecraft/world/GameMode;
-
SPECTATOR
- Mappings:
Namespace Name Mixin selector official dLbun;d:Lbun;intermediary field_9219Lnet/minecraft/class_1934;field_9219:Lnet/minecraft/class_1934;named SPECTATORLnet/minecraft/world/GameMode;SPECTATOR:Lnet/minecraft/world/GameMode;
-
-
Field Details
-
DEFAULT
- Mappings:
Namespace Name Mixin selector official eLbun;e:Lbun;intermediary field_28045Lnet/minecraft/class_1934;field_28045:Lnet/minecraft/class_1934;named DEFAULTLnet/minecraft/world/GameMode;DEFAULT:Lnet/minecraft/world/GameMode;
-
id
private final int id- Mappings:
Namespace Name Mixin selector official fLbun;f:Iintermediary field_9217Lnet/minecraft/class_1934;field_9217:Inamed idLnet/minecraft/world/GameMode;id:I
-
name
- Mappings:
Namespace Name Mixin selector official gLbun;g:Ljava/lang/String;intermediary field_9221Lnet/minecraft/class_1934;field_9221:Ljava/lang/String;named nameLnet/minecraft/world/GameMode;name:Ljava/lang/String;
-
simpleTranslatableName
- Mappings:
Namespace Name Mixin selector official hLbun;h:Loj;intermediary field_28046Lnet/minecraft/class_1934;field_28046:Lnet/minecraft/class_2561;named simpleTranslatableNameLnet/minecraft/world/GameMode;simpleTranslatableName:Lnet/minecraft/text/Text;
-
translatableName
- Mappings:
Namespace Name Mixin selector official iLbun;i:Loj;intermediary field_28047Lnet/minecraft/class_1934;field_28047:Lnet/minecraft/class_2561;named translatableNameLnet/minecraft/world/GameMode;translatableName:Lnet/minecraft/text/Text;
-
-
Constructor Details
-
GameMode
- Mappings:
Namespace Name Mixin selector official <init>Lbun;<init>(Ljava/lang/String;IILjava/lang/String;)Vintermediary <init>Lnet/minecraft/class_1934;<init>(Ljava/lang/String;IILjava/lang/String;)Vnamed <init>Lnet/minecraft/world/GameMode;<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 aLbun;a()Iintermediary method_8379Lnet/minecraft/class_1934;method_8379()Inamed getIdLnet/minecraft/world/GameMode;getId()I
-
getName
- Mappings:
Namespace Name Mixin selector official bLbun;b()Ljava/lang/String;intermediary method_8381Lnet/minecraft/class_1934;method_8381()Ljava/lang/String;named getNameLnet/minecraft/world/GameMode;getName()Ljava/lang/String;
-
getTranslatableName
- Mappings:
Namespace Name Mixin selector official cLbun;c()Loj;intermediary method_8383Lnet/minecraft/class_1934;method_8383()Lnet/minecraft/class_2561;named getTranslatableNameLnet/minecraft/world/GameMode;getTranslatableName()Lnet/minecraft/text/Text;
-
getSimpleTranslatableName
- Mappings:
Namespace Name Mixin selector official dLbun;d()Loj;intermediary method_32763Lnet/minecraft/class_1934;method_32763()Lnet/minecraft/class_2561;named getSimpleTranslatableNameLnet/minecraft/world/GameMode;getSimpleTranslatableName()Lnet/minecraft/text/Text;
-
setAbilities
- Mappings:
Namespace Name Mixin selector official aLbun;a(Lbic;)Vintermediary method_8382Lnet/minecraft/class_1934;method_8382(Lnet/minecraft/class_1656;)Vnamed setAbilitiesLnet/minecraft/world/GameMode;setAbilities(Lnet/minecraft/entity/player/PlayerAbilities;)V
-
isBlockBreakingRestricted
public boolean isBlockBreakingRestricted()- Mappings:
Namespace Name Mixin selector official eLbun;e()Zintermediary method_8387Lnet/minecraft/class_1934;method_8387()Znamed isBlockBreakingRestrictedLnet/minecraft/world/GameMode;isBlockBreakingRestricted()Z
-
isCreative
public boolean isCreative()- Mappings:
Namespace Name Mixin selector official fLbun;f()Zintermediary method_8386Lnet/minecraft/class_1934;method_8386()Znamed isCreativeLnet/minecraft/world/GameMode;isCreative()Z
-
isSurvivalLike
public boolean isSurvivalLike()- Mappings:
Namespace Name Mixin selector official gLbun;g()Zintermediary method_8388Lnet/minecraft/class_1934;method_8388()Znamed isSurvivalLikeLnet/minecraft/world/GameMode;isSurvivalLike()Z
-
byId
- Mappings:
Namespace Name Mixin selector official aLbun;a(I)Lbun;intermediary method_8384Lnet/minecraft/class_1934;method_8384(I)Lnet/minecraft/class_1934;named byIdLnet/minecraft/world/GameMode;byId(I)Lnet/minecraft/world/GameMode;
-
byId
- Mappings:
Namespace Name Mixin selector official aLbun;a(ILbun;)Lbun;intermediary method_8380Lnet/minecraft/class_1934;method_8380(ILnet/minecraft/class_1934;)Lnet/minecraft/class_1934;named byIdLnet/minecraft/world/GameMode;byId(ILnet/minecraft/world/GameMode;)Lnet/minecraft/world/GameMode;
-
byName
- Mappings:
Namespace Name Mixin selector official aLbun;a(Ljava/lang/String;)Lbun;intermediary method_8385Lnet/minecraft/class_1934;method_8385(Ljava/lang/String;)Lnet/minecraft/class_1934;named byNameLnet/minecraft/world/GameMode;byName(Ljava/lang/String;)Lnet/minecraft/world/GameMode;
-
byName
- Mappings:
Namespace Name Mixin selector official aLbun;a(Ljava/lang/String;Lbun;)Lbun;intermediary method_8378Lnet/minecraft/class_1934;method_8378(Ljava/lang/String;Lnet/minecraft/class_1934;)Lnet/minecraft/class_1934;named byNameLnet/minecraft/world/GameMode;byName(Ljava/lang/String;Lnet/minecraft/world/GameMode;)Lnet/minecraft/world/GameMode;
-
getId
- Mappings:
Namespace Name Mixin selector official aLbun;a(Lbun;)Iintermediary method_32761Lnet/minecraft/class_1934;method_32761(Lnet/minecraft/class_1934;)Inamed getIdLnet/minecraft/world/GameMode;getId(Lnet/minecraft/world/GameMode;)I
-
getOrNull
- Mappings:
Namespace Name Mixin selector official bLbun;b(I)Lbun;intermediary method_32762Lnet/minecraft/class_1934;method_32762(I)Lnet/minecraft/class_1934;named getOrNullLnet/minecraft/world/GameMode;getOrNull(I)Lnet/minecraft/world/GameMode;
-