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 int
color
private float[]
colorComponents
private int
colorSwapped
private int
fireworkColor
private int
id
private MaterialColor
materialColor
private String
name
private int
signColor
private static DyeColor[]
VALUES
-
Constructor Summary
Constructors Modifier Constructor Description private
DyeColor(int woolId, String name, int color, MaterialColor materialColor, int fireworkColor, int signColor)
-
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()
MaterialColor
getMaterialColor()
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
-
materialColor
-
color
private final int color -
colorSwapped
private final int colorSwapped -
colorComponents
private final float[] colorComponents -
fireworkColor
private final int fireworkColor -
signColor
private final int signColor
-
-
Constructor Details
-
DyeColor
private DyeColor(int woolId, String name, int color, MaterialColor materialColor, int fireworkColor, int signColor)
-
-
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() -
getMaterialColor
-
getFireworkColor
public int getFireworkColor() -
getSignColor
@Environment(CLIENT) public int getSignColor() -
byId
-
byName
-
byFireworkColor
-
toString
-
asString
- Specified by:
asString
in interfaceStringIdentifiable
-