Enum Class GameMode

java.lang.Object
java.lang.Enum<GameMode>
net.minecraft.world.GameMode
All Implemented Interfaces:
Serializable, Comparable<GameMode>, Constable, StringIdentifiable

public enum GameMode extends Enum<GameMode> implements StringIdentifiable
Mappings:
Namespace Name
named net/minecraft/world/GameMode
intermediary net/minecraft/class_1934
official dkg
  • Enum Constant Details Link icon

    • SURVIVAL Link icon

      public static final GameMode 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 Ldkg;a:Ldkg;
    • CREATIVE Link icon

      public static final GameMode 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 Ldkg;b:Ldkg;
    • ADVENTURE Link icon

      public static final GameMode 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 Ldkg;c:Ldkg;
    • SPECTATOR Link icon

      public static final GameMode 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 Ldkg;d:Ldkg;
  • Field Details Link icon

    • DEFAULT Link icon

      public static final GameMode 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 Ldkg;e:Ldkg;
    • CODEC Link icon

      public static final StringIdentifiable.EnumCodec<GameMode> 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 Ldkg;f:Lbax$a;
    • INDEX_MAPPER Link icon

      private static final IntFunction<GameMode> INDEX_MAPPER
      Mappings:
      Namespace Name Mixin selector
      named INDEX_MAPPER Lnet/minecraft/world/GameMode;INDEX_MAPPER:Ljava/util/function/IntFunction;
      intermediary field_41677 Lnet/minecraft/class_1934;field_41677:Ljava/util/function/IntFunction;
      official h Ldkg;h:Ljava/util/function/IntFunction;
    • INDEX_CODEC Link icon

      @Deprecated public static final com.mojang.serialization.Codec<GameMode> INDEX_CODEC
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      named INDEX_CODEC Lnet/minecraft/world/GameMode;INDEX_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_56668 Lnet/minecraft/class_1934;field_56668:Lcom/mojang/serialization/Codec;
      official g Ldkg;g:Lcom/mojang/serialization/Codec;
    • UNKNOWN Link icon

      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 i Ldkg;i:I
    • index Link icon

      private final int index
      Mappings:
      Namespace Name Mixin selector
      named index Lnet/minecraft/world/GameMode;index:I
      intermediary field_9217 Lnet/minecraft/class_1934;field_9217:I
      official j Ldkg;j:I
    • id Link icon

      private final String id
      Mappings:
      Namespace Name Mixin selector
      named id Lnet/minecraft/world/GameMode;id:Ljava/lang/String;
      intermediary field_9221 Lnet/minecraft/class_1934;field_9221:Ljava/lang/String;
      official k Ldkg;k:Ljava/lang/String;
    • simpleTranslatableName Link icon

      private final Text 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 l Ldkg;l:Lxg;
    • translatableName Link icon

      private final Text 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 m Ldkg;m:Lxg;
  • Constructor Details Link icon

    • GameMode Link icon

      private GameMode(int index, String id)
      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> Ldkg;<init>(Ljava/lang/String;IILjava/lang/String;)V
  • Method Details Link icon

    • values Link icon

      public static GameMode[] 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 Link icon

      public static GameMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getIndex Link icon

      public int getIndex()
      Mappings:
      Namespace Name Mixin selector
      named getIndex Lnet/minecraft/world/GameMode;getIndex()I
      intermediary method_8379 Lnet/minecraft/class_1934;method_8379()I
      official a Ldkg;a()I
    • getId Link icon

      public String getId()
      Mappings:
      Namespace Name Mixin selector
      named getId Lnet/minecraft/world/GameMode;getId()Ljava/lang/String;
      intermediary method_8381 Lnet/minecraft/class_1934;method_8381()Ljava/lang/String;
      official b Ldkg;b()Ljava/lang/String;
    • asString Link icon

      public String asString()
      Returns the unique string representation of the enum, used for serialization.
      Specified by:
      asString in interface StringIdentifiable
      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 Lbax;c()Ljava/lang/String;
    • getTranslatableName Link icon

      public Text 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 Ldkg;d()Lxg;
    • getSimpleTranslatableName Link icon

      public Text 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 Ldkg;e()Lxg;
    • setAbilities Link icon

      public void setAbilities(PlayerAbilities abilities)
      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 Ldkg;a(Lcse;)V
    • isBlockBreakingRestricted Link icon

      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 Ldkg;f()Z
    • isCreative Link icon

      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 Ldkg;g()Z
    • isSurvivalLike Link icon

      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 Ldkg;h()Z
    • byIndex Link icon

      public static GameMode byIndex(int index)
      Mappings:
      Namespace Name Mixin selector
      named byIndex Lnet/minecraft/world/GameMode;byIndex(I)Lnet/minecraft/world/GameMode;
      intermediary method_8384 Lnet/minecraft/class_1934;method_8384(I)Lnet/minecraft/class_1934;
      official a Ldkg;a(I)Ldkg;
    • byId Link icon

      public static GameMode byId(String id)
      Mappings:
      Namespace Name Mixin selector
      named byId Lnet/minecraft/world/GameMode;byId(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 Ldkg;a(Ljava/lang/String;)Ldkg;
    • byId Link icon

      @Contract("_,!null->!null;_,null->_") @Nullable public static @Nullable GameMode byId(String id, @Nullable @Nullable GameMode fallback)
      Mappings:
      Namespace Name Mixin selector
      named byId Lnet/minecraft/world/GameMode;byId(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 Ldkg;a(Ljava/lang/String;Ldkg;)Ldkg;
    • getId Link icon

      public static int getId(@Nullable @Nullable GameMode gameMode)
      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 Ldkg;a(Ldkg;)I
    • getOrNull Link icon

      @Nullable public static @Nullable GameMode getOrNull(int index)
      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 Ldkg;b(I)Ldkg;
    • isValid Link icon

      public static boolean isValid(int index)
      Mappings:
      Namespace Name Mixin selector
      named isValid Lnet/minecraft/world/GameMode;isValid(I)Z
      intermediary method_64760 Lnet/minecraft/class_1934;method_64760(I)Z
      official c Ldkg;c(I)Z