Package net.minecraft.world.item
Enum Class ItemDisplayContext
- All Implemented Interfaces:
Serializable
,Comparable<ItemDisplayContext>
,Constable
,StringRepresentable
,IExtensibleEnum
public enum ItemDisplayContext
extends Enum<ItemDisplayContext>
implements StringRepresentable, 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 AddCallback<ItemDisplayContext>
static final IntFunction<ItemDisplayContext>
static final com.mojang.serialization.Codec<ItemDisplayContext>
private final ItemDisplayContext
private 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
(ResourceLocation serializeName, ItemDisplayContext fallback) -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemDisplayContext
create
(String keyName, ResourceLocation serializedName, ItemDisplayContext fallback) fallback()
boolean
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.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface net.neoforged.neoforge.common.IExtensibleEnum
init
-
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 byte id -
name
-
isModded
private final boolean isModded -
fallback
-
ADD_CALLBACK
-
-
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
-
create
public static ItemDisplayContext create(String keyName, ResourceLocation serializedName, @Nullable ItemDisplayContext fallback)
-