net.minecraft.world.level

public enum GameType

implements StringRepresentable

cmf
net.minecraft.world.level.GameType
net.minecraft.class_1934
net.minecraft.world.GameMode
net.minecraft.src.C_1593_
net.minecraft.world.level.EnumGamemode

Enum constant summary

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

Field summary

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

Constructor summary

ModifierConstructor
private (int p_46389_, String p_46390_)

Method summary

Modifier and TypeMethod
public int
a()
getId()
method_8379()
getId()
m_46392_()
public String
b()
getName()
method_8381()
getName()
m_46405_()
public String
c()
getSerializedName()
method_15434()
asString()
m_7912_()
public Component
d()
getLongDisplayName()
method_8383()
getTranslatableName()
m_151499_()
public Component
e()
getShortDisplayName()
method_32763()
getSimpleTranslatableName()
m_151500_()
public void
a(byj arg0)
updatePlayerAbilities(Abilities arg0)
method_8382(class_1656 arg0)
setAbilities(PlayerAbilities abilities)
m_46398_(C_1138_ arg0)
public boolean
f()
isBlockPlacingRestricted()
method_8387()
isBlockBreakingRestricted()
m_46407_()
public boolean
g()
isCreative()
method_8386()
isCreative()
m_46408_()
public boolean
h()
isSurvival()
method_8388()
isSurvivalLike()
m_46409_()
public static GameType
a(int arg0)
byId(int arg0)
method_8384(int arg0)
byId(int id)
m_46393_(int p_46394_)
public static GameType
a(String arg0)
byName(String arg0)
method_8385(String arg0)
byName(String name)
m_46400_(String p_46401_)
public static GameType
a(String arg0, cmf arg1)
byName(String arg0, GameType arg1)
method_8378(String arg0, class_1934 arg1)
byName(String name, GameMode defaultMode)
m_46402_(String p_46403_, C_1593_ p_46404_)
public static int
a(cmf arg0)
getNullableId(GameType arg0)
method_32761(class_1934 arg0)
getId(GameMode gameMode)
m_151495_(C_1593_ p_151496_)
public static GameType
b(int arg0)
byNullableId(int arg0)
method_32762(int arg0)
getOrNull(int id)
m_151497_(int p_151498_)