@Environment(value=CLIENT) static enum GameModeSwitcherScreen.GameMode extends Enum<GameModeSwitcherScreen.GameMode>
| Enum Constant and Description |
|---|
ADVENTURE |
CREATIVE |
SPECTATOR |
SURVIVAL |
| Modifier and Type | Field and Description |
|---|---|
(package private) String |
command |
(package private) ItemStack |
icon |
protected static GameModeSwitcherScreen.GameMode[] |
MODES |
(package private) Text |
name |
| Modifier and Type | Method and Description |
|---|---|
private static Optional<GameModeSwitcherScreen.GameMode> |
fromGameMode(GameMode gameMode) |
private String |
getCommand() |
private Text |
getName() |
private Optional<GameModeSwitcherScreen.GameMode> |
getNext() |
private void |
renderIcon(ItemRenderer itemRenderer,
int x,
int y) |
static GameModeSwitcherScreen.GameMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GameModeSwitcherScreen.GameMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GameModeSwitcherScreen.GameMode CREATIVE
public static final GameModeSwitcherScreen.GameMode SURVIVAL
public static final GameModeSwitcherScreen.GameMode ADVENTURE
public static final GameModeSwitcherScreen.GameMode SPECTATOR
protected static final GameModeSwitcherScreen.GameMode[] MODES
final Text name
final String command
final ItemStack icon
public static GameModeSwitcherScreen.GameMode[] values()
for (GameModeSwitcherScreen.GameMode c : GameModeSwitcherScreen.GameMode.values()) System.out.println(c);
public static GameModeSwitcherScreen.GameMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullprivate void renderIcon(ItemRenderer itemRenderer, int x, int y)
private Text getName()
private String getCommand()
private Optional<GameModeSwitcherScreen.GameMode> getNext()
private static Optional<GameModeSwitcherScreen.GameMode> fromGameMode(GameMode gameMode)