Package net.minecraft.world
Enum Class GameMode
- All Implemented Interfaces:
- Serializable,- Comparable<GameMode>,- Constable,- StringIdentifiable
- Mappings:
- Namespace - Name - official - cmj- intermediary - net/minecraft/class_1934- named - net/minecraft/world/GameMode
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface net.minecraft.util.StringIdentifiableStringIdentifiable.Codec<E extends Enum<E> & StringIdentifiable>
- 
Enum Constant SummaryEnum Constants
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final IntFunction<GameMode>static final StringIdentifiable.Codec<GameMode>static final GameModeprivate final intprivate final Stringprivate final Textprivate final Textprivate static final intFields inherited from interface net.minecraft.util.StringIdentifiablefield_38377
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionasString()Returns the unique string representation of the enum, used for serialization.static GameModebyId(int id) static GameModeintgetId()static intgetName()getOrNull(int id) booleanbooleanbooleanvoidsetAbilities(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 - official - a- Lcmj;a:Lcmj;- intermediary - field_9215- Lnet/minecraft/class_1934;field_9215:Lnet/minecraft/class_1934;- named - SURVIVAL- Lnet/minecraft/world/GameMode;SURVIVAL:Lnet/minecraft/world/GameMode;
 
- 
CREATIVE- Mappings:
- Namespace - Name - Mixin selector - official - b- Lcmj;b:Lcmj;- intermediary - field_9220- Lnet/minecraft/class_1934;field_9220:Lnet/minecraft/class_1934;- named - CREATIVE- Lnet/minecraft/world/GameMode;CREATIVE:Lnet/minecraft/world/GameMode;
 
- 
ADVENTURE- Mappings:
- Namespace - Name - Mixin selector - official - c- Lcmj;c:Lcmj;- intermediary - field_9216- Lnet/minecraft/class_1934;field_9216:Lnet/minecraft/class_1934;- named - ADVENTURE- Lnet/minecraft/world/GameMode;ADVENTURE:Lnet/minecraft/world/GameMode;
 
- 
SPECTATOR- Mappings:
- Namespace - Name - Mixin selector - official - d- Lcmj;d:Lcmj;- intermediary - field_9219- Lnet/minecraft/class_1934;field_9219:Lnet/minecraft/class_1934;- named - SPECTATOR- Lnet/minecraft/world/GameMode;SPECTATOR:Lnet/minecraft/world/GameMode;
 
 
- 
- 
Field Details- 
DEFAULT- Mappings:
- Namespace - Name - Mixin selector - official - e- Lcmj;e:Lcmj;- intermediary - field_28045- Lnet/minecraft/class_1934;field_28045:Lnet/minecraft/class_1934;- named - DEFAULT- Lnet/minecraft/world/GameMode;DEFAULT:Lnet/minecraft/world/GameMode;
 
- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - official - f- Lcmj;f:Lapr$a;- intermediary - field_41676- Lnet/minecraft/class_1934;field_41676:Lnet/minecraft/class_3542$class_7292;- named - CODEC- Lnet/minecraft/world/GameMode;CODEC:Lnet/minecraft/util/StringIdentifiable$Codec;
 
- 
BY_ID- Mappings:
- Namespace - Name - Mixin selector - official - g- Lcmj;g:Ljava/util/function/IntFunction;- intermediary - field_41677- Lnet/minecraft/class_1934;field_41677:Ljava/util/function/IntFunction;- named - BY_ID- Lnet/minecraft/world/GameMode;BY_ID:Ljava/util/function/IntFunction;
 
- 
UNKNOWNprivate static final int UNKNOWN- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - h- Lcmj;h:I- intermediary - field_30964- Lnet/minecraft/class_1934;field_30964:I- named - UNKNOWN- Lnet/minecraft/world/GameMode;UNKNOWN:I
 
- 
idprivate final int id- Mappings:
- Namespace - Name - Mixin selector - official - i- Lcmj;i:I- intermediary - field_9217- Lnet/minecraft/class_1934;field_9217:I- named - id- Lnet/minecraft/world/GameMode;id:I
 
- 
name- Mappings:
- Namespace - Name - Mixin selector - official - j- Lcmj;j:Ljava/lang/String;- intermediary - field_9221- Lnet/minecraft/class_1934;field_9221:Ljava/lang/String;- named - name- Lnet/minecraft/world/GameMode;name:Ljava/lang/String;
 
- 
simpleTranslatableName- Mappings:
- Namespace - Name - Mixin selector - official - k- Lcmj;k:Lsw;- intermediary - field_28046- Lnet/minecraft/class_1934;field_28046:Lnet/minecraft/class_2561;- named - simpleTranslatableName- Lnet/minecraft/world/GameMode;simpleTranslatableName:Lnet/minecraft/text/Text;
 
- 
translatableName- Mappings:
- Namespace - Name - Mixin selector - official - l- Lcmj;l:Lsw;- intermediary - field_28047- Lnet/minecraft/class_1934;field_28047:Lnet/minecraft/class_2561;- named - translatableName- Lnet/minecraft/world/GameMode;translatableName:Lnet/minecraft/text/Text;
 
 
- 
- 
Constructor Details- 
GameMode- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lcmj;<init>(Ljava/lang/String;IILjava/lang/String;)V- intermediary - <init>- Lnet/minecraft/class_1934;<init>(Ljava/lang/String;IILjava/lang/String;)V- named - <init>- Lnet/minecraft/world/GameMode;<init>(Ljava/lang/String;IILjava/lang/String;)V
 
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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 name
- NullPointerException- if the argument is null
 
- 
getIdpublic int getId()- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcmj;a()I- intermediary - method_8379- Lnet/minecraft/class_1934;method_8379()I- named - getId- Lnet/minecraft/world/GameMode;getId()I
 
- 
getName- Mappings:
- Namespace - Name - Mixin selector - official - b- Lcmj;b()Ljava/lang/String;- intermediary - method_8381- Lnet/minecraft/class_1934;method_8381()Ljava/lang/String;- named - getName- Lnet/minecraft/world/GameMode;getName()Ljava/lang/String;
 
- 
asStringReturns the unique string representation of the enum, used for serialization.- Specified by:
- asStringin interface- StringIdentifiable
- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lapr;c()Ljava/lang/String;- intermediary - method_15434- Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;- named - asString- Lnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
 
- 
getTranslatableName- Mappings:
- Namespace - Name - Mixin selector - official - d- Lcmj;d()Lsw;- intermediary - method_8383- Lnet/minecraft/class_1934;method_8383()Lnet/minecraft/class_2561;- named - getTranslatableName- Lnet/minecraft/world/GameMode;getTranslatableName()Lnet/minecraft/text/Text;
 
- 
getSimpleTranslatableName- Mappings:
- Namespace - Name - Mixin selector - official - e- Lcmj;e()Lsw;- intermediary - method_32763- Lnet/minecraft/class_1934;method_32763()Lnet/minecraft/class_2561;- named - getSimpleTranslatableName- Lnet/minecraft/world/GameMode;getSimpleTranslatableName()Lnet/minecraft/text/Text;
 
- 
setAbilities- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcmj;a(Lbyl;)V- intermediary - method_8382- Lnet/minecraft/class_1934;method_8382(Lnet/minecraft/class_1656;)V- named - setAbilities- Lnet/minecraft/world/GameMode;setAbilities(Lnet/minecraft/entity/player/PlayerAbilities;)V
 
- 
isBlockBreakingRestrictedpublic boolean isBlockBreakingRestricted()- Mappings:
- Namespace - Name - Mixin selector - official - f- Lcmj;f()Z- intermediary - method_8387- Lnet/minecraft/class_1934;method_8387()Z- named - isBlockBreakingRestricted- Lnet/minecraft/world/GameMode;isBlockBreakingRestricted()Z
 
- 
isCreativepublic boolean isCreative()- Mappings:
- Namespace - Name - Mixin selector - official - g- Lcmj;g()Z- intermediary - method_8386- Lnet/minecraft/class_1934;method_8386()Z- named - isCreative- Lnet/minecraft/world/GameMode;isCreative()Z
 
- 
isSurvivalLikepublic boolean isSurvivalLike()- Mappings:
- Namespace - Name - Mixin selector - official - h- Lcmj;h()Z- intermediary - method_8388- Lnet/minecraft/class_1934;method_8388()Z- named - isSurvivalLike- Lnet/minecraft/world/GameMode;isSurvivalLike()Z
 
- 
byId- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcmj;a(I)Lcmj;- intermediary - method_8384- Lnet/minecraft/class_1934;method_8384(I)Lnet/minecraft/class_1934;- named - byId- Lnet/minecraft/world/GameMode;byId(I)Lnet/minecraft/world/GameMode;
 
- 
byName- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcmj;a(Ljava/lang/String;)Lcmj;- intermediary - method_8385- Lnet/minecraft/class_1934;method_8385(Ljava/lang/String;)Lnet/minecraft/class_1934;- named - byName- Lnet/minecraft/world/GameMode;byName(Ljava/lang/String;)Lnet/minecraft/world/GameMode;
 
- 
byName@Contract("_,!null->!null;_,null->_") @Nullable public static @Nullable GameMode byName(String name, @Nullable @Nullable GameMode defaultMode) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lcmj;a(Ljava/lang/String;Lcmj;)Lcmj;- intermediary - method_8378- Lnet/minecraft/class_1934;method_8378(Ljava/lang/String;Lnet/minecraft/class_1934;)Lnet/minecraft/class_1934;- named - byName- Lnet/minecraft/world/GameMode;byName(Ljava/lang/String;Lnet/minecraft/world/GameMode;)Lnet/minecraft/world/GameMode;
 
- 
getId- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcmj;a(Lcmj;)I- intermediary - method_32761- Lnet/minecraft/class_1934;method_32761(Lnet/minecraft/class_1934;)I- named - getId- Lnet/minecraft/world/GameMode;getId(Lnet/minecraft/world/GameMode;)I
 
- 
getOrNull- Mappings:
- Namespace - Name - Mixin selector - official - b- Lcmj;b(I)Lcmj;- intermediary - method_32762- Lnet/minecraft/class_1934;method_32762(I)Lnet/minecraft/class_1934;- named - getOrNull- Lnet/minecraft/world/GameMode;getOrNull(I)Lnet/minecraft/world/GameMode;
 
 
-