Enum Class GameType

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

public enum GameType extends Enum<GameType>
  • Enum Constant Details

    • NOT_SET

      public static final GameType NOT_SET
    • SURVIVAL

      public static final GameType SURVIVAL
    • CREATIVE

      public static final GameType CREATIVE
    • ADVENTURE

      public static final GameType ADVENTURE
    • SPECTATOR

      public static final GameType SPECTATOR
  • Field Details

    • id

      private final int id
    • name

      private final String name
  • Constructor Details

    • GameType

      private GameType(int p_i48711_3_, String p_i48711_4_)
  • Method Details

    • values

      public static GameType[] 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

      public static GameType 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
    • getId

      public int getId()
    • getName

      public String getName()
    • getDisplayName

      public ITextComponent getDisplayName()
    • updatePlayerAbilities

      public void updatePlayerAbilities(PlayerAbilities p_77147_1_)
    • isBlockPlacingRestricted

      public boolean isBlockPlacingRestricted()
    • isCreative

      public boolean isCreative()
    • isSurvival

      public boolean isSurvival()
    • byId

      public static GameType byId(int p_77146_0_)
    • byId

      public static GameType byId(int p_185329_0_, GameType p_185329_1_)
    • byName

      public static GameType byName(String p_77142_0_)
    • byName

      public static GameType byName(String p_185328_0_, GameType p_185328_1_)