Enum Class ItemDisplayType
- All Implemented Interfaces:
Serializable
,Comparable<ItemDisplayType>
,Constable
Represents the context for an itemstack to be displayed.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe rendering context when the player is holding an item in first person in their left hand.The rendering context when the player is holding an item in first person in their right hand.The rendering context when the item is in an item frame.The rendering context when the item is on the ground.The rendering context when the item is on the player's screen, such as in the hotbar.The rendering context when the item is on the player's head.The item is not displayed.The rendering context when the player is holding an item in third person in their left hand.The rendering context when the player is holding an item in third person in their right hand. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the type is displayed.boolean
Returns whether the type is in first person.boolean
isGui()
Returns whether the type is equal toGUI
.boolean
Returns whether the type is in third person.static ItemDisplayType
Returns the enum constant of this class with the specified name.static ItemDisplayType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
The item is not displayed. -
THIRD_PERSON_LEFT_HAND
The rendering context when the player is holding an item in third person in their left hand. -
THIRD_PERSON_RIGHT_HAND
The rendering context when the player is holding an item in third person in their right hand. -
FIRST_PERSON_LEFT_HAND
The rendering context when the player is holding an item in first person in their left hand. -
FIRST_PERSON_RIGHT_HAND
The rendering context when the player is holding an item in first person in their right hand. -
HEAD
The rendering context when the item is on the player's head. -
GUI
The rendering context when the item is on the player's screen, such as in the hotbar. Used forInstruction.DRAW_ITEMSTACK
and is the default. -
GROUND
The rendering context when the item is on the ground. -
FIXED
The rendering context when the item is in an item frame.
-
-
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
-
isDisplayed
public boolean isDisplayed()Returns whether the type is displayed.- Returns:
- true if the type is not equal to
NONE
, false otherwise
-
isFirstPerson
public boolean isFirstPerson()Returns whether the type is in first person.- Returns:
- true if the type is in first person, false otherwise
-
isThirdPerson
public boolean isThirdPerson()Returns whether the type is in third person.- Returns:
- true if the type is in third person, false otherwise
-
isGui
public boolean isGui()Returns whether the type is equal toGUI
.- Returns:
- true if the type is equal to
GUI
, false otherwise
-