Package net.minecraft.util
Enum DyeColor
- All Implemented Interfaces:
Serializable
,Comparable<DyeColor>
,java.lang.constant.Constable
,StringIdentifiable
public enum DyeColor extends Enum<DyeColor> implements StringIdentifiable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description private static Int2ObjectOpenHashMap<DyeColor>
BY_FIREWORK_COLOR
private float[]
colorComponents
private int
fireworkColor
private int
id
private MapColor
mapColor
private String
name
private int
signColor
private static DyeColor[]
VALUES
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description String
asString()
static DyeColor
byFireworkColor(int color)
static DyeColor
byId(int id)
static DyeColor
byName(String name, DyeColor defaultColor)
float[]
getColorComponents()
int
getFireworkColor()
int
getId()
MapColor
getMapColor()
String
getName()
int
getSignColor()
String
toString()
static DyeColor
valueOf(String name)
Returns the enum constant of this type with the specified name.static DyeColor[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
WHITE
-
ORANGE
-
MAGENTA
-
LIGHT_BLUE
-
YELLOW
-
LIME
-
PINK
-
GRAY
-
LIGHT_GRAY
-
CYAN
-
PURPLE
-
BLUE
-
BROWN
-
GREEN
-
RED
-
BLACK
-
-
Field Details
-
VALUES
-
BY_FIREWORK_COLOR
-
id
private final int id -
name
-
mapColor
-
colorComponents
private final float[] colorComponents -
fireworkColor
private final int fireworkColor -
signColor
private final int signColor
-
-
Constructor Details
-
DyeColor
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getId
public int getId() -
getName
-
getColorComponents
public float[] getColorComponents() -
getMapColor
-
getFireworkColor
public int getFireworkColor() -
getSignColor
@Environment(CLIENT) public int getSignColor() -
byId
-
byName
-
byFireworkColor
-
toString
-
asString
- Specified by:
asString
in interfaceStringIdentifiable
-