Package net.minecraft.item
Enum DyeColor
- java.lang.Object
-
- java.lang.Enum<DyeColor>
-
- net.minecraft.item.DyeColor
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DyeColor>
,IStringSerializable
public enum DyeColor extends java.lang.Enum<DyeColor> implements IStringSerializable
-
-
Field Summary
Fields Modifier and Type Field Description private static it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<DyeColor>
BY_FIREWORK_COLOR
private static DyeColor[]
BY_ID
private MaterialColor
color
private int
fireworkColor
private int
id
private java.lang.String
name
private Tags.IOptionalNamedTag<Item>
tag
private int
textColor
private int
textureDiffuseColor
private int
textureDiffuseColorBGR
private float[]
textureDiffuseColors
-
Constructor Summary
Constructors Modifier Constructor Description private
DyeColor(int p_i50049_3_, java.lang.String p_i50049_4_, int p_i50049_5_, MaterialColor p_i50049_6_, int p_i50049_7_, int p_i50049_8_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DyeColor
byFireworkColor(int p_196058_0_)
static DyeColor
byId(int p_196056_0_)
static DyeColor
byName(java.lang.String p_204271_0_, DyeColor p_204271_1_)
static DyeColor
getColor(ItemStack stack)
int
getColorValue()
int
getFireworkColor()
int
getId()
MaterialColor
getMaterialColor()
java.lang.String
getName()
java.lang.String
getSerializedName()
Tags.IOptionalNamedTag<Item>
getTag()
int
getTextColor()
float[]
getTextureDiffuseColors()
java.lang.String
toString()
static DyeColor
valueOf(java.lang.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 Detail
-
WHITE
public static final DyeColor WHITE
-
ORANGE
public static final DyeColor ORANGE
-
MAGENTA
public static final DyeColor MAGENTA
-
LIGHT_BLUE
public static final DyeColor LIGHT_BLUE
-
YELLOW
public static final DyeColor YELLOW
-
LIME
public static final DyeColor LIME
-
PINK
public static final DyeColor PINK
-
GRAY
public static final DyeColor GRAY
-
LIGHT_GRAY
public static final DyeColor LIGHT_GRAY
-
CYAN
public static final DyeColor CYAN
-
PURPLE
public static final DyeColor PURPLE
-
BLUE
public static final DyeColor BLUE
-
BROWN
public static final DyeColor BROWN
-
GREEN
public static final DyeColor GREEN
-
RED
public static final DyeColor RED
-
BLACK
public static final DyeColor BLACK
-
-
Field Detail
-
BY_ID
private static final DyeColor[] BY_ID
-
BY_FIREWORK_COLOR
private static final it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<DyeColor> BY_FIREWORK_COLOR
-
id
private final int id
-
name
private final java.lang.String name
-
color
private final MaterialColor color
-
textureDiffuseColor
private final int textureDiffuseColor
-
textureDiffuseColorBGR
private final int textureDiffuseColorBGR
-
textureDiffuseColors
private final float[] textureDiffuseColors
-
fireworkColor
private final int fireworkColor
-
tag
private final Tags.IOptionalNamedTag<Item> tag
-
textColor
private final int textColor
-
-
Constructor Detail
-
DyeColor
private DyeColor(int p_i50049_3_, java.lang.String p_i50049_4_, int p_i50049_5_, MaterialColor p_i50049_6_, int p_i50049_7_, int p_i50049_8_)
-
-
Method Detail
-
values
public static DyeColor[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DyeColor c : DyeColor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DyeColor valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getId
public int getId()
-
getName
public java.lang.String getName()
-
getTextureDiffuseColors
public float[] getTextureDiffuseColors()
-
getMaterialColor
public MaterialColor getMaterialColor()
-
getFireworkColor
public int getFireworkColor()
-
getTextColor
public int getTextColor()
-
byId
public static DyeColor byId(int p_196056_0_)
-
byFireworkColor
@Nullable public static DyeColor byFireworkColor(int p_196058_0_)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<DyeColor>
-
getSerializedName
public java.lang.String getSerializedName()
- Specified by:
getSerializedName
in interfaceIStringSerializable
-
getColorValue
public int getColorValue()
-
getTag
public Tags.IOptionalNamedTag<Item> getTag()
-
-