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 ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AddCallback<ItemDisplayContext> static final IntFunction<ItemDisplayContext> static final com.mojang.serialization.Codec<ItemDisplayContext> private final @Nullable ItemDisplayContextprivate byteprivate final booleanprivate final StringFields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateItemDisplayContext(int p_270624_, String p_270851_) privateItemDisplayContext(ResourceLocation serializeName, ItemDisplayContext fallback) -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemDisplayContextcreate(String keyName, ResourceLocation serializedName, @Nullable ItemDisplayContext fallback) @Nullable ItemDisplayContextfallback()booleanbytegetId()booleanisModded()static ItemDisplayContextReturns 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, valueOfMethods 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:
getSerializedNamein interfaceStringRepresentable
-
getId
public byte getId() -
firstPerson
public boolean firstPerson() -
isModded
public boolean isModded() -
fallback
-
create
public static ItemDisplayContext create(String keyName, ResourceLocation serializedName, @Nullable @Nullable ItemDisplayContext fallback)
-