枚举 GameMode

  • 所有已实现的接口:
    Serializable, Comparable<GameMode>

    public enum GameMode
    extends Enum<GameMode>
    Mappings:
    Namespace Name
    official bvo
    intermediary net/minecraft/class_1934
    named net/minecraft/world/GameMode
    • 枚举常量详细资料

      • SURVIVAL

        public static final GameMode SURVIVAL
        Mappings:
        Namespace Name Mixin selector
        official a Lbvo;a:Lbvo;
        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

        public static final GameMode CREATIVE
        Mappings:
        Namespace Name Mixin selector
        official b Lbvo;b:Lbvo;
        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

        public static final GameMode ADVENTURE
        Mappings:
        Namespace Name Mixin selector
        official c Lbvo;c:Lbvo;
        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

        public static final GameMode SPECTATOR
        Mappings:
        Namespace Name Mixin selector
        official d Lbvo;d:Lbvo;
        intermediary field_9219 Lnet/minecraft/class_1934;field_9219:Lnet/minecraft/class_1934;
        named SPECTATOR Lnet/minecraft/world/GameMode;SPECTATOR:Lnet/minecraft/world/GameMode;
    • 字段详细资料

      • DEFAULT

        public static final GameMode DEFAULT
        Mappings:
        Namespace Name Mixin selector
        official e Lbvo;e:Lbvo;
        intermediary field_28045 Lnet/minecraft/class_1934;field_28045:Lnet/minecraft/class_1934;
        named DEFAULT Lnet/minecraft/world/GameMode;DEFAULT:Lnet/minecraft/world/GameMode;
      • field_30964

        private static final int field_30964
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official f Lbvo;f:I
        intermediary field_30964 Lnet/minecraft/class_1934;field_30964:I
        named field_30964 Lnet/minecraft/world/GameMode;field_30964:I
      • id

        private final int id
        Mappings:
        Namespace Name Mixin selector
        official g Lbvo;g:I
        intermediary field_9217 Lnet/minecraft/class_1934;field_9217:I
        named id Lnet/minecraft/world/GameMode;id:I
      • name

        private final String name
        Mappings:
        Namespace Name Mixin selector
        official h Lbvo;h: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

        private final Text simpleTranslatableName
        Mappings:
        Namespace Name Mixin selector
        official i Lbvo;i:Lon;
        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

        private final Text translatableName
        Mappings:
        Namespace Name Mixin selector
        official j Lbvo;j:Lon;
        intermediary field_28047 Lnet/minecraft/class_1934;field_28047:Lnet/minecraft/class_2561;
        named translatableName Lnet/minecraft/world/GameMode;translatableName:Lnet/minecraft/text/Text;
    • 构造器详细资料

      • GameMode

        private GameMode​(int id,
                         String name)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lbvo;<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
    • 方法详细资料

      • values

        public static GameMode[] values()
        按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:
        for (GameMode c : GameMode.values())
            System.out.println(c);
        
        返回:
        按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
      • valueOf

        public static GameMode valueOf​(String name)
        返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
        参数:
        name - 要返回的枚举常量的名称。
        返回:
        返回带有指定名称的枚举常量
        抛出:
        IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量
        NullPointerException - 如果参数为空值
      • getId

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

        public String getName()
        Mappings:
        Namespace Name Mixin selector
        official b Lbvo;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;
      • getTranslatableName

        public Text getTranslatableName()
        Mappings:
        Namespace Name Mixin selector
        official c Lbvo;c()Lon;
        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

        public Text getSimpleTranslatableName()
        Mappings:
        Namespace Name Mixin selector
        official d Lbvo;d()Lon;
        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

        public void setAbilities​(PlayerAbilities abilities)
        Mappings:
        Namespace Name Mixin selector
        official a Lbvo;a(Lbjc;)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
      • isBlockBreakingRestricted

        public boolean isBlockBreakingRestricted()
        Mappings:
        Namespace Name Mixin selector
        official e Lbvo;e()Z
        intermediary method_8387 Lnet/minecraft/class_1934;method_8387()Z
        named isBlockBreakingRestricted Lnet/minecraft/world/GameMode;isBlockBreakingRestricted()Z
      • isCreative

        public boolean isCreative()
        Mappings:
        Namespace Name Mixin selector
        official f Lbvo;f()Z
        intermediary method_8386 Lnet/minecraft/class_1934;method_8386()Z
        named isCreative Lnet/minecraft/world/GameMode;isCreative()Z
      • isSurvivalLike

        public boolean isSurvivalLike()
        Mappings:
        Namespace Name Mixin selector
        official g Lbvo;g()Z
        intermediary method_8388 Lnet/minecraft/class_1934;method_8388()Z
        named isSurvivalLike Lnet/minecraft/world/GameMode;isSurvivalLike()Z
      • byId

        public static GameMode byId​(int id)
        Mappings:
        Namespace Name Mixin selector
        official a Lbvo;a(I)Lbvo;
        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;
      • byId

        public static GameMode byId​(int id,
                                    GameMode defaultMode)
        Mappings:
        Namespace Name Mixin selector
        official a Lbvo;a(ILbvo;)Lbvo;
        intermediary method_8380 Lnet/minecraft/class_1934;method_8380(ILnet/minecraft/class_1934;)Lnet/minecraft/class_1934;
        named byId Lnet/minecraft/world/GameMode;byId(ILnet/minecraft/world/GameMode;)Lnet/minecraft/world/GameMode;
      • byName

        public static GameMode byName​(String name)
        Mappings:
        Namespace Name Mixin selector
        official a Lbvo;a(Ljava/lang/String;)Lbvo;
        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

        public static GameMode byName​(String name,
                                      GameMode defaultMode)
        Mappings:
        Namespace Name Mixin selector
        official a Lbvo;a(Ljava/lang/String;Lbvo;)Lbvo;
        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

        public static int getId​(@Nullable
                                @Nullable GameMode gameMode)
        Mappings:
        Namespace Name Mixin selector
        official a Lbvo;a(Lbvo;)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

        @Nullable
        public static @Nullable GameMode getOrNull​(int id)
        Mappings:
        Namespace Name Mixin selector
        official b Lbvo;b(I)Lbvo;
        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;