net.minecraft.world.level

public enum GameType

implements StringRepresentable

dgg
net.minecraft.world.level.GameType
net.minecraft.class_1934
net.minecraft.world.GameMode
net.minecraft.world.level.EnumGamemode

Enum constant summary

Enum Constant
a
SURVIVAL
field_9215
SURVIVAL
b
CREATIVE
field_9220
CREATIVE
c
ADVENTURE
field_9216
ADVENTURE
d
SPECTATOR
field_9219
SPECTATOR

Field summary

Modifier and TypeField
public static final GameType
e
DEFAULT_MODE
field_28045
DEFAULT
public static final StringRepresentable$EnumCodec<GameType>
f
CODEC
field_41676
CODEC
private static final IntFunction<GameType>
g
BY_ID
field_41677
BY_ID
private static final int
h
NOT_SET
field_30964
UNKNOWN
private final int
i
id
field_9217
id
private final String
j
name
field_9221
name
private final Component
k
shortName
field_28046
simpleTranslatableName
private final Component
l
longName
field_28047
translatableName

Constructor summary

ModifierConstructor
private (int arg0, String arg1)

Method summary

Modifier and TypeMethod
public int
a()
getId()
method_8379()
getId()
public String
b()
getName()
method_8381()
getName()
public String
c()
getSerializedName()
method_15434()
asString()
public Component
d()
getLongDisplayName()
method_8383()
getTranslatableName()
public Component
e()
getShortDisplayName()
method_32763()
getSimpleTranslatableName()
public void
a(cou arg0)
updatePlayerAbilities(Abilities arg0)
method_8382(class_1656 arg0)
setAbilities(PlayerAbilities abilities)
public boolean
f()
isBlockPlacingRestricted()
method_8387()
isBlockBreakingRestricted()
public boolean
g()
isCreative()
method_8386()
isCreative()
public boolean
h()
isSurvival()
method_8388()
isSurvivalLike()
public static GameType
a(int arg0)
byId(int arg0)
method_8384(int arg0)
byId(int id)
public static GameType
a(String arg0)
byName(String arg0)
method_8385(String arg0)
byName(String name)
public static GameType
a(String arg0, dgg arg1)
byName(String arg0, GameType arg1)
method_8378(String arg0, class_1934 arg1)
byName(String name, GameMode defaultMode)
public static int
a(dgg arg0)
getNullableId(GameType arg0)
method_32761(class_1934 arg0)
getId(GameMode gameMode)
public static GameType
b(int arg0)
byNullableId(int arg0)
method_32762(int arg0)
getOrNull(int id)
public static boolean
c(int arg0)
isValidId(int arg0)
method_64760(int arg0)
isValid(int id)