Package net.minecraft.util
Enum Class DyeColor
- All Implemented Interfaces:
Serializable,Comparable<DyeColor>,Constable,StringIdentifiable
An enum representing 16 dye colors.
- Mappings:
Namespace Name official cczintermediary net/minecraft/class_1767named net/minecraft/util/DyeColor
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface net.minecraft.util.StringIdentifiable
StringIdentifiable.Codec<E extends Enum<E> & StringIdentifiable> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Int2ObjectOpenHashMap<DyeColor>private static final IntFunction<DyeColor>static final StringIdentifiable.Codec<DyeColor>private final float[]private final intprivate final intprivate final MapColorprivate final Stringprivate final intFields inherited from interface net.minecraft.util.StringIdentifiable
field_38377 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasString()Returns the unique string representation of the enum, used for serialization.byFireworkColor(int color) Returns the dye color whose firework color iscolor, ornullif there is no such color.static DyeColorbyId(int id) Returns the dye color whose ID isid.Returns the dye color whose name isname, ordefaultColorif there is no such color.float[]Returns the float array containing the red, green and blue components of this dye color.intReturns the color used for colored fireworks as RGB integer.intgetId()Returns the integer ID of the dye color.Returns the corresponding map color.getName()Returns the name of the dye color.intReturns the color used for dyed signs as RGB integer.toString()static DyeColorReturns the enum constant of this class with the specified name.static DyeColor[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WHITE
- Mappings:
Namespace Name Mixin selector official aLccz;a:Lccz;intermediary field_7952Lnet/minecraft/class_1767;field_7952:Lnet/minecraft/class_1767;named WHITELnet/minecraft/util/DyeColor;WHITE:Lnet/minecraft/util/DyeColor;
-
ORANGE
- Mappings:
Namespace Name Mixin selector official bLccz;b:Lccz;intermediary field_7946Lnet/minecraft/class_1767;field_7946:Lnet/minecraft/class_1767;named ORANGELnet/minecraft/util/DyeColor;ORANGE:Lnet/minecraft/util/DyeColor;
-
MAGENTA
- Mappings:
Namespace Name Mixin selector official cLccz;c:Lccz;intermediary field_7958Lnet/minecraft/class_1767;field_7958:Lnet/minecraft/class_1767;named MAGENTALnet/minecraft/util/DyeColor;MAGENTA:Lnet/minecraft/util/DyeColor;
-
LIGHT_BLUE
- Mappings:
Namespace Name Mixin selector official dLccz;d:Lccz;intermediary field_7951Lnet/minecraft/class_1767;field_7951:Lnet/minecraft/class_1767;named LIGHT_BLUELnet/minecraft/util/DyeColor;LIGHT_BLUE:Lnet/minecraft/util/DyeColor;
-
YELLOW
- Mappings:
Namespace Name Mixin selector official eLccz;e:Lccz;intermediary field_7947Lnet/minecraft/class_1767;field_7947:Lnet/minecraft/class_1767;named YELLOWLnet/minecraft/util/DyeColor;YELLOW:Lnet/minecraft/util/DyeColor;
-
LIME
- Mappings:
Namespace Name Mixin selector official fLccz;f:Lccz;intermediary field_7961Lnet/minecraft/class_1767;field_7961:Lnet/minecraft/class_1767;named LIMELnet/minecraft/util/DyeColor;LIME:Lnet/minecraft/util/DyeColor;
-
PINK
- Mappings:
Namespace Name Mixin selector official gLccz;g:Lccz;intermediary field_7954Lnet/minecraft/class_1767;field_7954:Lnet/minecraft/class_1767;named PINKLnet/minecraft/util/DyeColor;PINK:Lnet/minecraft/util/DyeColor;
-
GRAY
- Mappings:
Namespace Name Mixin selector official hLccz;h:Lccz;intermediary field_7944Lnet/minecraft/class_1767;field_7944:Lnet/minecraft/class_1767;named GRAYLnet/minecraft/util/DyeColor;GRAY:Lnet/minecraft/util/DyeColor;
-
LIGHT_GRAY
- Mappings:
Namespace Name Mixin selector official iLccz;i:Lccz;intermediary field_7967Lnet/minecraft/class_1767;field_7967:Lnet/minecraft/class_1767;named LIGHT_GRAYLnet/minecraft/util/DyeColor;LIGHT_GRAY:Lnet/minecraft/util/DyeColor;
-
CYAN
- Mappings:
Namespace Name Mixin selector official jLccz;j:Lccz;intermediary field_7955Lnet/minecraft/class_1767;field_7955:Lnet/minecraft/class_1767;named CYANLnet/minecraft/util/DyeColor;CYAN:Lnet/minecraft/util/DyeColor;
-
PURPLE
- Mappings:
Namespace Name Mixin selector official kLccz;k:Lccz;intermediary field_7945Lnet/minecraft/class_1767;field_7945:Lnet/minecraft/class_1767;named PURPLELnet/minecraft/util/DyeColor;PURPLE:Lnet/minecraft/util/DyeColor;
-
BLUE
- Mappings:
Namespace Name Mixin selector official lLccz;l:Lccz;intermediary field_7966Lnet/minecraft/class_1767;field_7966:Lnet/minecraft/class_1767;named BLUELnet/minecraft/util/DyeColor;BLUE:Lnet/minecraft/util/DyeColor;
-
BROWN
- Mappings:
Namespace Name Mixin selector official mLccz;m:Lccz;intermediary field_7957Lnet/minecraft/class_1767;field_7957:Lnet/minecraft/class_1767;named BROWNLnet/minecraft/util/DyeColor;BROWN:Lnet/minecraft/util/DyeColor;
-
GREEN
- Mappings:
Namespace Name Mixin selector official nLccz;n:Lccz;intermediary field_7942Lnet/minecraft/class_1767;field_7942:Lnet/minecraft/class_1767;named GREENLnet/minecraft/util/DyeColor;GREEN:Lnet/minecraft/util/DyeColor;
-
RED
- Mappings:
Namespace Name Mixin selector official oLccz;o:Lccz;intermediary field_7964Lnet/minecraft/class_1767;field_7964:Lnet/minecraft/class_1767;named REDLnet/minecraft/util/DyeColor;RED:Lnet/minecraft/util/DyeColor;
-
BLACK
- Mappings:
Namespace Name Mixin selector official pLccz;p:Lccz;intermediary field_7963Lnet/minecraft/class_1767;field_7963:Lnet/minecraft/class_1767;named BLACKLnet/minecraft/util/DyeColor;BLACK:Lnet/minecraft/util/DyeColor;
-
-
Field Details
-
BY_ID
- Mappings:
Namespace Name Mixin selector official rLccz;r:Ljava/util/function/IntFunction;intermediary field_7959Lnet/minecraft/class_1767;field_7959:Ljava/util/function/IntFunction;named BY_IDLnet/minecraft/util/DyeColor;BY_ID:Ljava/util/function/IntFunction;
-
BY_FIREWORK_COLOR
- Mappings:
Namespace Name Mixin selector official sLccz;s:Lit/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap;intermediary field_7950Lnet/minecraft/class_1767;field_7950:Lit/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap;named BY_FIREWORK_COLORLnet/minecraft/util/DyeColor;BY_FIREWORK_COLOR:Lit/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap;
-
CODEC
- Mappings:
Namespace Name Mixin selector official qLccz;q:Lapd$a;intermediary field_41600Lnet/minecraft/class_1767;field_41600:Lnet/minecraft/class_3542$class_7292;named CODECLnet/minecraft/util/DyeColor;CODEC:Lnet/minecraft/util/StringIdentifiable$Codec;
-
id
private final int id- Mappings:
Namespace Name Mixin selector official tLccz;t:Iintermediary field_7965Lnet/minecraft/class_1767;field_7965:Inamed idLnet/minecraft/util/DyeColor;id:I
-
name
- Mappings:
Namespace Name Mixin selector official uLccz;u:Ljava/lang/String;intermediary field_7948Lnet/minecraft/class_1767;field_7948:Ljava/lang/String;named nameLnet/minecraft/util/DyeColor;name:Ljava/lang/String;
-
mapColor
- Mappings:
Namespace Name Mixin selector official vLccz;v:Lduc;intermediary field_7956Lnet/minecraft/class_1767;field_7956:Lnet/minecraft/class_3620;named mapColorLnet/minecraft/util/DyeColor;mapColor:Lnet/minecraft/block/MapColor;
-
colorComponents
private final float[] colorComponents- Mappings:
Namespace Name Mixin selector official wLccz;w:[Fintermediary field_7943Lnet/minecraft/class_1767;field_7943:[Fnamed colorComponentsLnet/minecraft/util/DyeColor;colorComponents:[F
-
fireworkColor
private final int fireworkColor- Mappings:
Namespace Name Mixin selector official xLccz;x:Iintermediary field_7960Lnet/minecraft/class_1767;field_7960:Inamed fireworkColorLnet/minecraft/util/DyeColor;fireworkColor:I
-
signColor
private final int signColor- Mappings:
Namespace Name Mixin selector official yLccz;y:Iintermediary field_16537Lnet/minecraft/class_1767;field_16537:Inamed signColorLnet/minecraft/util/DyeColor;signColor:I
-
-
Constructor Details
-
DyeColor
private DyeColor(int id, String name, int color, MapColor mapColor, int fireworkColor, int signColor) - Mappings:
Namespace Name Mixin selector official <init>Lccz;<init>(Ljava/lang/String;IILjava/lang/String;ILduc;II)Vintermediary <init>Lnet/minecraft/class_1767;<init>(Ljava/lang/String;IILjava/lang/String;ILnet/minecraft/class_3620;II)Vnamed <init>Lnet/minecraft/util/DyeColor;<init>(Ljava/lang/String;IILjava/lang/String;ILnet/minecraft/block/MapColor;II)V
-
-
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
-
getId
public int getId()Returns the integer ID of the dye color.- Returns:
- the integer ID of the dye color
- Mappings:
Namespace Name Mixin selector official aLccz;a()Iintermediary method_7789Lnet/minecraft/class_1767;method_7789()Inamed getIdLnet/minecraft/util/DyeColor;getId()I
-
getName
Returns the name of the dye color.- Returns:
- the name of the dye color
- Mappings:
Namespace Name Mixin selector official bLccz;b()Ljava/lang/String;intermediary method_7792Lnet/minecraft/class_1767;method_7792()Ljava/lang/String;named getNameLnet/minecraft/util/DyeColor;getName()Ljava/lang/String;
-
getColorComponents
public float[] getColorComponents()Returns the float array containing the red, green and blue components of this dye color.Each value of the array is between
0.0and255.0(both inclusive).- Returns:
- the float array containing the red, green and blue components of this dye color
- Mappings:
Namespace Name Mixin selector official dLccz;d()[Fintermediary method_7787Lnet/minecraft/class_1767;method_7787()[Fnamed getColorComponentsLnet/minecraft/util/DyeColor;getColorComponents()[F
-
getMapColor
Returns the corresponding map color.- Returns:
- the corresponding map color
- Mappings:
Namespace Name Mixin selector official eLccz;e()Lduc;intermediary method_7794Lnet/minecraft/class_1767;method_7794()Lnet/minecraft/class_3620;named getMapColorLnet/minecraft/util/DyeColor;getMapColor()Lnet/minecraft/block/MapColor;
-
getFireworkColor
public int getFireworkColor()Returns the color used for colored fireworks as RGB integer.The returned value is between
0and0xFFFFFF.- Returns:
- the color used for colored fireworks as RGB integer
- Mappings:
Namespace Name Mixin selector official fLccz;f()Iintermediary method_7790Lnet/minecraft/class_1767;method_7790()Inamed getFireworkColorLnet/minecraft/util/DyeColor;getFireworkColor()I
-
getSignColor
public int getSignColor()Returns the color used for dyed signs as RGB integer.The returned value is between
0and0xFFFFFF.- Returns:
- the color used for dyed signs as RGB integer
- Mappings:
Namespace Name Mixin selector official gLccz;g()Iintermediary method_16357Lnet/minecraft/class_1767;method_16357()Inamed getSignColorLnet/minecraft/util/DyeColor;getSignColor()I
-
byId
Returns the dye color whose ID isid.- Returns:
- the dye color whose ID is
id - API Note:
- If out-of-range IDs are passed, this returns
WHITE. - Mappings:
Namespace Name Mixin selector official aLccz;a(I)Lccz;intermediary method_7791Lnet/minecraft/class_1767;method_7791(I)Lnet/minecraft/class_1767;named byIdLnet/minecraft/util/DyeColor;byId(I)Lnet/minecraft/util/DyeColor;
-
byName
@Contract("_,!null->!null;_,null->_") @Nullable public static @Nullable DyeColor byName(String name, @Nullable @Nullable DyeColor defaultColor) Returns the dye color whose name isname, ordefaultColorif there is no such color.- Returns:
- the dye color whose name is
name, ordefaultColorif there is no such color - API Note:
- This returns
nullonly ifdefaultColorisnull. - Mappings:
Namespace Name Mixin selector official aLccz;a(Ljava/lang/String;Lccz;)Lccz;intermediary method_7793Lnet/minecraft/class_1767;method_7793(Ljava/lang/String;Lnet/minecraft/class_1767;)Lnet/minecraft/class_1767;named byNameLnet/minecraft/util/DyeColor;byName(Ljava/lang/String;Lnet/minecraft/util/DyeColor;)Lnet/minecraft/util/DyeColor;
-
byFireworkColor
Returns the dye color whose firework color iscolor, ornullif there is no such color.- Returns:
- the dye color whose firework color is
color, ornullif there is no such color - Mappings:
Namespace Name Mixin selector official bLccz;b(I)Lccz;intermediary method_7786Lnet/minecraft/class_1767;method_7786(I)Lnet/minecraft/class_1767;named byFireworkColorLnet/minecraft/util/DyeColor;byFireworkColor(I)Lnet/minecraft/util/DyeColor;
-
toString
-
asString
Returns the unique string representation of the enum, used for serialization.- Specified by:
asStringin interfaceStringIdentifiable- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector official cLapd;c()Ljava/lang/String;intermediary method_15434Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;named asStringLnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
-