Enum Class Texture.Type

java.lang.Object
java.lang.Enum<Texture.Type>
io.github.cottonmc.cotton.gui.widget.data.Texture.Type
All Implemented Interfaces:
Serializable, Comparable<Texture.Type>, Constable
Enclosing class:
Texture

public static enum Texture.Type extends Enum<Texture.Type>
A Texture's type. It represents the location of the texture.
Since:
9.0.0
  • Enum Constant Details

    • STANDALONE

      public static final Texture.Type STANDALONE
      A texture in a standalone texture file.

      The image IDs of standalone textures contain the full file path to the texture inside the assets/<namespace> directory. For example, my_mod:textures/widget/example.png refers to assets/my_mod/textures/widget/example.png.

    • GUI_SPRITE

      public static final Texture.Type GUI_SPRITE
      A texture in the GUI sprite atlas.

      The image IDs of GUI sprites only contain the subpath to the texture inside the sprite directory without the file extension. For example, my_mod:example refers to assets/my_mod/textures/gui/sprites/example.png.

  • Method Details

    • values

      public static Texture.Type[] 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 Texture.Type 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