Enum Class Texture.Type
- All Implemented Interfaces:
Serializable,Comparable<Texture.Type>,Constable
- Enclosing class:
Texture
A
Texture's type. It represents the location of the texture.- Since:
- 9.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA texture in the GUI sprite atlas.A texture in a standalone texture file. -
Method Summary
Modifier and TypeMethodDescriptionstatic Texture.TypeReturns the enum constant of this class with the specified name.static Texture.Type[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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.pngrefers toassets/my_mod/textures/widget/example.png. -
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:examplerefers toassets/my_mod/textures/gui/sprites/example.png.
-
-
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
-