Package net.minecraft.world.item
Enum Class ItemDisplayContext
- All Implemented Interfaces:
Serializable
,Comparable<ItemDisplayContext>
,Constable
,StringRepresentable
,net.neoforged.fml.common.asm.enumextension.IExtensibleEnum
public enum ItemDisplayContext
extends Enum<ItemDisplayContext>
implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable
StringRepresentable.EnumCodec<E extends Enum<E> & StringRepresentable>, StringRepresentable.StringRepresentableCodec<S extends StringRepresentable>
-
Enum Constant Summary
Enum ConstantDescription -
Field Summary
Modifier and TypeFieldDescriptionstatic final IntFunction
<ItemDisplayContext> static final com.mojang.serialization.Codec
<ItemDisplayContext> private final Supplier
<ItemDisplayContext> private final byte
private final boolean
private final String
Fields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD
-
Constructor Summary
ModifierConstructorDescriptionprivate
ItemDisplayContext
(int p_270624_, String p_270851_) private
ItemDisplayContext
(int id, String name, @Nullable String fallbackName) -
Method Summary
Modifier and TypeMethodDescription@Nullable ItemDisplayContext
fallback()
boolean
static net.neoforged.fml.common.asm.enumextension.ExtensionInfo
byte
getId()
boolean
isModded()
static ItemDisplayContext
Returns the enum constant of this class with the specified name.static ItemDisplayContext[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
THIRD_PERSON_LEFT_HAND
-
THIRD_PERSON_RIGHT_HAND
-
FIRST_PERSON_LEFT_HAND
-
FIRST_PERSON_RIGHT_HAND
-
HEAD
-
GUI
-
GROUND
-
FIXED
-
-
Field Details
-
CODEC
-
BY_ID
-
id
private final byte id -
name
-
isModded
private final boolean isModded -
fallback
-
-
Constructor Details
-
ItemDisplayContext
-
ItemDisplayContext
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getSerializedName
- Specified by:
getSerializedName
in interfaceStringRepresentable
-
getId
public byte getId() -
firstPerson
public boolean firstPerson() -
isModded
public boolean isModded() -
fallback
-
getExtensionInfo
public static net.neoforged.fml.common.asm.enumextension.ExtensionInfo getExtensionInfo()
-