Enum Class ItemDisplayType

java.lang.Object
java.lang.Enum<ItemDisplayType>
xyz.gmitch215.socketmc.util.render.ItemDisplayType
All Implemented Interfaces:
Serializable, Comparable<ItemDisplayType>, Constable

public enum ItemDisplayType extends Enum<ItemDisplayType>
Represents the context for an itemstack to be displayed.
  • Enum Constant Details

    • NONE

      public static final ItemDisplayType NONE
      The item is not displayed.
    • THIRD_PERSON_LEFT_HAND

      public static final ItemDisplayType 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

      public static final ItemDisplayType 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

      public static final ItemDisplayType 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

      public static final ItemDisplayType FIRST_PERSON_RIGHT_HAND
      The rendering context when the player is holding an item in first person in their right hand.
    • GUI

      public static final ItemDisplayType GUI
      The rendering context when the item is on the player's screen, such as in the hotbar. Used for Instruction.DRAW_ITEMSTACK and is the default.
    • GROUND

      public static final ItemDisplayType GROUND
      The rendering context when the item is on the ground.
    • FIXED

      public static final ItemDisplayType FIXED
      The rendering context when the item is in an item frame.
  • Method Details

    • values

      public static ItemDisplayType[] 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

      public static ItemDisplayType valueOf(String name)
      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 name
      NullPointerException - 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 to GUI.
      Returns:
      true if the type is equal to GUI, false otherwise