Package net.minecraft.util
Enum Class DyeColor
- All Implemented Interfaces:
 Serializable,Comparable<DyeColor>,Constable,StringIdentifiable
An enum representing 16 dye colors.
- Mappings:
 Namespace Name named net/minecraft/util/DyeColorintermediary net/minecraft/class_1767official dbt
- 
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.BasicCodec<S extends StringIdentifiable>, StringIdentifiable.EnumCodec<E extends Enum<E> & StringIdentifiable> - 
Enum Constant Summary
Enum Constants - 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Int2ObjectOpenHashMap<DyeColor> static final StringIdentifiable.EnumCodec<DyeColor> private final intprivate final intprivate final Stringprivate final intstatic final com.mojang.serialization.Codec<DyeColor> Deprecated.private static final IntFunction<DyeColor> private final MapColorstatic final PacketCodec<ByteBuf, DyeColor> private final intFields inherited from interface net.minecraft.util.StringIdentifiable
CACHED_MAP_THRESHOLD - 
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.Returns the dye color whose id isid, orfallbackif there is no such color.static DyeColorbyIndex(int index) Returns the dye color whose index isindex.private static CraftingRecipeInputcreateColorMixingRecipeInput(DyeColor first, DyeColor second) intReturns the color used for things like tropical fish, beacon beams, sheep, and tamed animal collars as ARGB integer.intReturns the color used for colored fireworks as RGB integer.getId()Returns the id of the dye color.intgetIndex()Returns the index of the dye color.Returns the corresponding map color.intReturns the color used for dyed signs as RGB integer.static DyeColormixColors(ServerWorld world, DyeColor first, DyeColor second) 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 named WHITELnet/minecraft/util/DyeColor;WHITE:Lnet/minecraft/util/DyeColor;intermediary field_7952Lnet/minecraft/class_1767;field_7952:Lnet/minecraft/class_1767;official aLdbt;a:Ldbt;
 - 
ORANGE
- Mappings:
 Namespace Name Mixin selector named ORANGELnet/minecraft/util/DyeColor;ORANGE:Lnet/minecraft/util/DyeColor;intermediary field_7946Lnet/minecraft/class_1767;field_7946:Lnet/minecraft/class_1767;official bLdbt;b:Ldbt;
 - 
MAGENTA
- Mappings:
 Namespace Name Mixin selector named MAGENTALnet/minecraft/util/DyeColor;MAGENTA:Lnet/minecraft/util/DyeColor;intermediary field_7958Lnet/minecraft/class_1767;field_7958:Lnet/minecraft/class_1767;official cLdbt;c:Ldbt;
 - 
LIGHT_BLUE
- Mappings:
 Namespace Name Mixin selector named LIGHT_BLUELnet/minecraft/util/DyeColor;LIGHT_BLUE:Lnet/minecraft/util/DyeColor;intermediary field_7951Lnet/minecraft/class_1767;field_7951:Lnet/minecraft/class_1767;official dLdbt;d:Ldbt;
 - 
YELLOW
- Mappings:
 Namespace Name Mixin selector named YELLOWLnet/minecraft/util/DyeColor;YELLOW:Lnet/minecraft/util/DyeColor;intermediary field_7947Lnet/minecraft/class_1767;field_7947:Lnet/minecraft/class_1767;official eLdbt;e:Ldbt;
 - 
LIME
- Mappings:
 Namespace Name Mixin selector named LIMELnet/minecraft/util/DyeColor;LIME:Lnet/minecraft/util/DyeColor;intermediary field_7961Lnet/minecraft/class_1767;field_7961:Lnet/minecraft/class_1767;official fLdbt;f:Ldbt;
 - 
PINK
- Mappings:
 Namespace Name Mixin selector named PINKLnet/minecraft/util/DyeColor;PINK:Lnet/minecraft/util/DyeColor;intermediary field_7954Lnet/minecraft/class_1767;field_7954:Lnet/minecraft/class_1767;official gLdbt;g:Ldbt;
 - 
GRAY
- Mappings:
 Namespace Name Mixin selector named GRAYLnet/minecraft/util/DyeColor;GRAY:Lnet/minecraft/util/DyeColor;intermediary field_7944Lnet/minecraft/class_1767;field_7944:Lnet/minecraft/class_1767;official hLdbt;h:Ldbt;
 - 
LIGHT_GRAY
- Mappings:
 Namespace Name Mixin selector named LIGHT_GRAYLnet/minecraft/util/DyeColor;LIGHT_GRAY:Lnet/minecraft/util/DyeColor;intermediary field_7967Lnet/minecraft/class_1767;field_7967:Lnet/minecraft/class_1767;official iLdbt;i:Ldbt;
 - 
CYAN
- Mappings:
 Namespace Name Mixin selector named CYANLnet/minecraft/util/DyeColor;CYAN:Lnet/minecraft/util/DyeColor;intermediary field_7955Lnet/minecraft/class_1767;field_7955:Lnet/minecraft/class_1767;official jLdbt;j:Ldbt;
 - 
PURPLE
- Mappings:
 Namespace Name Mixin selector named PURPLELnet/minecraft/util/DyeColor;PURPLE:Lnet/minecraft/util/DyeColor;intermediary field_7945Lnet/minecraft/class_1767;field_7945:Lnet/minecraft/class_1767;official kLdbt;k:Ldbt;
 - 
BLUE
- Mappings:
 Namespace Name Mixin selector named BLUELnet/minecraft/util/DyeColor;BLUE:Lnet/minecraft/util/DyeColor;intermediary field_7966Lnet/minecraft/class_1767;field_7966:Lnet/minecraft/class_1767;official lLdbt;l:Ldbt;
 - 
BROWN
- Mappings:
 Namespace Name Mixin selector named BROWNLnet/minecraft/util/DyeColor;BROWN:Lnet/minecraft/util/DyeColor;intermediary field_7957Lnet/minecraft/class_1767;field_7957:Lnet/minecraft/class_1767;official mLdbt;m:Ldbt;
 - 
GREEN
- Mappings:
 Namespace Name Mixin selector named GREENLnet/minecraft/util/DyeColor;GREEN:Lnet/minecraft/util/DyeColor;intermediary field_7942Lnet/minecraft/class_1767;field_7942:Lnet/minecraft/class_1767;official nLdbt;n:Ldbt;
 - 
RED
- Mappings:
 Namespace Name Mixin selector named REDLnet/minecraft/util/DyeColor;RED:Lnet/minecraft/util/DyeColor;intermediary field_7964Lnet/minecraft/class_1767;field_7964:Lnet/minecraft/class_1767;official oLdbt;o:Ldbt;
 - 
BLACK
- Mappings:
 Namespace Name Mixin selector named BLACKLnet/minecraft/util/DyeColor;BLACK:Lnet/minecraft/util/DyeColor;intermediary field_7963Lnet/minecraft/class_1767;field_7963:Lnet/minecraft/class_1767;official pLdbt;p:Ldbt;
 
 - 
 - 
Field Details
- 
INDEX_MAPPER
- Mappings:
 Namespace Name Mixin selector named INDEX_MAPPERLnet/minecraft/util/DyeColor;INDEX_MAPPER:Ljava/util/function/IntFunction;intermediary field_7959Lnet/minecraft/class_1767;field_7959:Ljava/util/function/IntFunction;official tLdbt;t:Ljava/util/function/IntFunction;
 - 
BY_FIREWORK_COLOR
- Mappings:
 Namespace Name Mixin selector named BY_FIREWORK_COLORLnet/minecraft/util/DyeColor;BY_FIREWORK_COLOR:Lit/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap;intermediary field_7950Lnet/minecraft/class_1767;field_7950:Lit/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap;official uLdbt;u:Lit/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap;
 - 
CODEC
- Mappings:
 Namespace Name Mixin selector named CODECLnet/minecraft/util/DyeColor;CODEC:Lnet/minecraft/util/StringIdentifiable$EnumCodec;intermediary field_41600Lnet/minecraft/class_1767;field_41600:Lnet/minecraft/class_3542$class_7292;official qLdbt;q:Lbda$a;
 - 
PACKET_CODEC
- Mappings:
 Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/util/DyeColor;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49259Lnet/minecraft/class_1767;field_49259:Lnet/minecraft/class_9139;official rLdbt;r:Lzm;
 - 
INDEX_CODEC
Deprecated.- Mappings:
 Namespace Name Mixin selector named INDEX_CODECLnet/minecraft/util/DyeColor;INDEX_CODEC:Lcom/mojang/serialization/Codec;intermediary field_56666Lnet/minecraft/class_1767;field_56666:Lcom/mojang/serialization/Codec;official sLdbt;s:Lcom/mojang/serialization/Codec;
 - 
index
private final int index- Mappings:
 Namespace Name Mixin selector named indexLnet/minecraft/util/DyeColor;index:Iintermediary field_7965Lnet/minecraft/class_1767;field_7965:Iofficial vLdbt;v:I
 - 
id
- Mappings:
 Namespace Name Mixin selector named idLnet/minecraft/util/DyeColor;id:Ljava/lang/String;intermediary field_7948Lnet/minecraft/class_1767;field_7948:Ljava/lang/String;official wLdbt;w:Ljava/lang/String;
 - 
mapColor
- Mappings:
 Namespace Name Mixin selector named mapColorLnet/minecraft/util/DyeColor;mapColor:Lnet/minecraft/block/MapColor;intermediary field_7956Lnet/minecraft/class_1767;field_7956:Lnet/minecraft/class_3620;official xLdbt;x:Lfap;
 - 
entityColor
private final int entityColor- Mappings:
 Namespace Name Mixin selector named entityColorLnet/minecraft/util/DyeColor;entityColor:Iintermediary field_7943Lnet/minecraft/class_1767;field_7943:Iofficial yLdbt;y:I
 - 
fireworkColor
private final int fireworkColor- Mappings:
 Namespace Name Mixin selector named fireworkColorLnet/minecraft/util/DyeColor;fireworkColor:Iintermediary field_7960Lnet/minecraft/class_1767;field_7960:Iofficial zLdbt;z:I
 - 
signColor
private final int signColor- Mappings:
 Namespace Name Mixin selector named signColorLnet/minecraft/util/DyeColor;signColor:Iintermediary field_16537Lnet/minecraft/class_1767;field_16537:Iofficial ALdbt;A:I
 
 - 
 - 
Constructor Details
- 
DyeColor
private DyeColor(int index, String id, int entityColor, MapColor mapColor, int fireworkColor, int signColor) - Mappings:
 Namespace Name Mixin selector named <init>Lnet/minecraft/util/DyeColor;<init>(Ljava/lang/String;IILjava/lang/String;ILnet/minecraft/block/MapColor;II)Vintermediary <init>Lnet/minecraft/class_1767;<init>(Ljava/lang/String;IILjava/lang/String;ILnet/minecraft/class_3620;II)Vofficial <init>Ldbt;<init>(Ljava/lang/String;IILjava/lang/String;ILfap;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
 - 
getIndex
public int getIndex()Returns the index of the dye color.- Returns:
 - the index of the dye color
 - Mappings:
 Namespace Name Mixin selector named getIndexLnet/minecraft/util/DyeColor;getIndex()Iintermediary method_7789Lnet/minecraft/class_1767;method_7789()Iofficial aLdbt;a()I
 - 
getId
Returns the id of the dye color.- Returns:
 - the id of the dye color
 - Mappings:
 Namespace Name Mixin selector named getIdLnet/minecraft/util/DyeColor;getId()Ljava/lang/String;intermediary method_7792Lnet/minecraft/class_1767;method_7792()Ljava/lang/String;official bLdbt;b()Ljava/lang/String;
 - 
getEntityColor
public int getEntityColor()Returns the color used for things like tropical fish, beacon beams, sheep, and tamed animal collars as ARGB integer.The returned value is between
0xFF000000and0xFFFFFFFF.- Returns:
 - the color used for things like tropical fish, beacon beams, sheep, and tamed animal collars as ARGB integer
 - Mappings:
 Namespace Name Mixin selector named getEntityColorLnet/minecraft/util/DyeColor;getEntityColor()Iintermediary method_7787Lnet/minecraft/class_1767;method_7787()Iofficial dLdbt;d()I
 - 
getMapColor
Returns the corresponding map color.- Returns:
 - the corresponding map color
 - Mappings:
 Namespace Name Mixin selector named getMapColorLnet/minecraft/util/DyeColor;getMapColor()Lnet/minecraft/block/MapColor;intermediary method_7794Lnet/minecraft/class_1767;method_7794()Lnet/minecraft/class_3620;official eLdbt;e()Lfap;
 - 
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 named getFireworkColorLnet/minecraft/util/DyeColor;getFireworkColor()Iintermediary method_7790Lnet/minecraft/class_1767;method_7790()Iofficial fLdbt;f()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 named getSignColorLnet/minecraft/util/DyeColor;getSignColor()Iintermediary method_16357Lnet/minecraft/class_1767;method_16357()Iofficial gLdbt;g()I
 - 
byIndex
Returns the dye color whose index isindex.- Returns:
 - the dye color whose index is 
index - API Note:
 - If out-of-range indices are passed, this returns 
WHITE. - Mappings:
 Namespace Name Mixin selector named byIndexLnet/minecraft/util/DyeColor;byIndex(I)Lnet/minecraft/util/DyeColor;intermediary method_7791Lnet/minecraft/class_1767;method_7791(I)Lnet/minecraft/class_1767;official aLdbt;a(I)Ldbt;
 - 
byId
@Contract("_,!null->!null;_,null->_") @Nullable public static @Nullable DyeColor byId(String id, @Nullable @Nullable DyeColor fallback) Returns the dye color whose id isid, orfallbackif there is no such color.- Returns:
 - the dye color whose id is 
id, orfallbackif there is no such color - API Note:
 - This returns 
nullonly iffallbackisnull. - Mappings:
 Namespace Name Mixin selector named byIdLnet/minecraft/util/DyeColor;byId(Ljava/lang/String;Lnet/minecraft/util/DyeColor;)Lnet/minecraft/util/DyeColor;intermediary method_7793Lnet/minecraft/class_1767;method_7793(Ljava/lang/String;Lnet/minecraft/class_1767;)Lnet/minecraft/class_1767;official aLdbt;a(Ljava/lang/String;Ldbt;)Ldbt;
 - 
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 named byFireworkColorLnet/minecraft/util/DyeColor;byFireworkColor(I)Lnet/minecraft/util/DyeColor;intermediary method_7786Lnet/minecraft/class_1767;method_7786(I)Lnet/minecraft/class_1767;official bLdbt;b(I)Ldbt;
 - 
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 named asStringLnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;intermediary method_15434Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;official cLbda;c()Ljava/lang/String;
 - 
mixColors
- Mappings:
 Namespace Name Mixin selector named mixColorsLnet/minecraft/util/DyeColor;mixColors(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/DyeColor;Lnet/minecraft/util/DyeColor;)Lnet/minecraft/util/DyeColor;intermediary method_65355Lnet/minecraft/class_1767;method_65355(Lnet/minecraft/class_3218;Lnet/minecraft/class_1767;Lnet/minecraft/class_1767;)Lnet/minecraft/class_1767;official aLdbt;a(Laub;Ldbt;Ldbt;)Ldbt;
 - 
createColorMixingRecipeInput
- Mappings:
 Namespace Name Mixin selector named createColorMixingRecipeInputLnet/minecraft/util/DyeColor;createColorMixingRecipeInput(Lnet/minecraft/util/DyeColor;Lnet/minecraft/util/DyeColor;)Lnet/minecraft/recipe/input/CraftingRecipeInput;intermediary method_65356Lnet/minecraft/class_1767;method_65356(Lnet/minecraft/class_1767;Lnet/minecraft/class_1767;)Lnet/minecraft/class_9694;official aLdbt;a(Ldbt;Ldbt;)Ldha;
 
 -