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/DyeColor- intermediary - net/minecraft/class_1767- official - cvn
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface net.minecraft.util.StringIdentifiableStringIdentifiable.BasicCodec<S extends StringIdentifiable>, StringIdentifiable.EnumCodec<E extends Enum<E> & StringIdentifiable>
- 
Enum Constant SummaryEnum Constants
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final Int2ObjectOpenHashMap<DyeColor> private static final IntFunction<DyeColor> static final StringIdentifiable.EnumCodec<DyeColor> private final intprivate final intprivate final intprivate final MapColorprivate final Stringstatic final PacketCodec<ByteBuf, DyeColor> private final intFields inherited from interface net.minecraft.util.StringIdentifiableCACHED_MAP_THRESHOLD
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.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.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.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 - WHITE- Lnet/minecraft/util/DyeColor;WHITE:Lnet/minecraft/util/DyeColor;- intermediary - field_7952- Lnet/minecraft/class_1767;field_7952:Lnet/minecraft/class_1767;- official - a- Lcvn;a:Lcvn;
 
- 
ORANGE- Mappings:
- Namespace - Name - Mixin selector - named - ORANGE- Lnet/minecraft/util/DyeColor;ORANGE:Lnet/minecraft/util/DyeColor;- intermediary - field_7946- Lnet/minecraft/class_1767;field_7946:Lnet/minecraft/class_1767;- official - b- Lcvn;b:Lcvn;
 
- 
MAGENTA- Mappings:
- Namespace - Name - Mixin selector - named - MAGENTA- Lnet/minecraft/util/DyeColor;MAGENTA:Lnet/minecraft/util/DyeColor;- intermediary - field_7958- Lnet/minecraft/class_1767;field_7958:Lnet/minecraft/class_1767;- official - c- Lcvn;c:Lcvn;
 
- 
LIGHT_BLUE- Mappings:
- Namespace - Name - Mixin selector - named - LIGHT_BLUE- Lnet/minecraft/util/DyeColor;LIGHT_BLUE:Lnet/minecraft/util/DyeColor;- intermediary - field_7951- Lnet/minecraft/class_1767;field_7951:Lnet/minecraft/class_1767;- official - d- Lcvn;d:Lcvn;
 
- 
YELLOW- Mappings:
- Namespace - Name - Mixin selector - named - YELLOW- Lnet/minecraft/util/DyeColor;YELLOW:Lnet/minecraft/util/DyeColor;- intermediary - field_7947- Lnet/minecraft/class_1767;field_7947:Lnet/minecraft/class_1767;- official - e- Lcvn;e:Lcvn;
 
- 
LIME- Mappings:
- Namespace - Name - Mixin selector - named - LIME- Lnet/minecraft/util/DyeColor;LIME:Lnet/minecraft/util/DyeColor;- intermediary - field_7961- Lnet/minecraft/class_1767;field_7961:Lnet/minecraft/class_1767;- official - f- Lcvn;f:Lcvn;
 
- 
PINK- Mappings:
- Namespace - Name - Mixin selector - named - PINK- Lnet/minecraft/util/DyeColor;PINK:Lnet/minecraft/util/DyeColor;- intermediary - field_7954- Lnet/minecraft/class_1767;field_7954:Lnet/minecraft/class_1767;- official - g- Lcvn;g:Lcvn;
 
- 
GRAY- Mappings:
- Namespace - Name - Mixin selector - named - GRAY- Lnet/minecraft/util/DyeColor;GRAY:Lnet/minecraft/util/DyeColor;- intermediary - field_7944- Lnet/minecraft/class_1767;field_7944:Lnet/minecraft/class_1767;- official - h- Lcvn;h:Lcvn;
 
- 
LIGHT_GRAY- Mappings:
- Namespace - Name - Mixin selector - named - LIGHT_GRAY- Lnet/minecraft/util/DyeColor;LIGHT_GRAY:Lnet/minecraft/util/DyeColor;- intermediary - field_7967- Lnet/minecraft/class_1767;field_7967:Lnet/minecraft/class_1767;- official - i- Lcvn;i:Lcvn;
 
- 
CYAN- Mappings:
- Namespace - Name - Mixin selector - named - CYAN- Lnet/minecraft/util/DyeColor;CYAN:Lnet/minecraft/util/DyeColor;- intermediary - field_7955- Lnet/minecraft/class_1767;field_7955:Lnet/minecraft/class_1767;- official - j- Lcvn;j:Lcvn;
 
- 
PURPLE- Mappings:
- Namespace - Name - Mixin selector - named - PURPLE- Lnet/minecraft/util/DyeColor;PURPLE:Lnet/minecraft/util/DyeColor;- intermediary - field_7945- Lnet/minecraft/class_1767;field_7945:Lnet/minecraft/class_1767;- official - k- Lcvn;k:Lcvn;
 
- 
BLUE- Mappings:
- Namespace - Name - Mixin selector - named - BLUE- Lnet/minecraft/util/DyeColor;BLUE:Lnet/minecraft/util/DyeColor;- intermediary - field_7966- Lnet/minecraft/class_1767;field_7966:Lnet/minecraft/class_1767;- official - l- Lcvn;l:Lcvn;
 
- 
BROWN- Mappings:
- Namespace - Name - Mixin selector - named - BROWN- Lnet/minecraft/util/DyeColor;BROWN:Lnet/minecraft/util/DyeColor;- intermediary - field_7957- Lnet/minecraft/class_1767;field_7957:Lnet/minecraft/class_1767;- official - m- Lcvn;m:Lcvn;
 
- 
GREEN- Mappings:
- Namespace - Name - Mixin selector - named - GREEN- Lnet/minecraft/util/DyeColor;GREEN:Lnet/minecraft/util/DyeColor;- intermediary - field_7942- Lnet/minecraft/class_1767;field_7942:Lnet/minecraft/class_1767;- official - n- Lcvn;n:Lcvn;
 
- 
RED- Mappings:
- Namespace - Name - Mixin selector - named - RED- Lnet/minecraft/util/DyeColor;RED:Lnet/minecraft/util/DyeColor;- intermediary - field_7964- Lnet/minecraft/class_1767;field_7964:Lnet/minecraft/class_1767;- official - o- Lcvn;o:Lcvn;
 
- 
BLACK- Mappings:
- Namespace - Name - Mixin selector - named - BLACK- Lnet/minecraft/util/DyeColor;BLACK:Lnet/minecraft/util/DyeColor;- intermediary - field_7963- Lnet/minecraft/class_1767;field_7963:Lnet/minecraft/class_1767;- official - p- Lcvn;p:Lcvn;
 
 
- 
- 
Field Details- 
BY_ID- Mappings:
- Namespace - Name - Mixin selector - named - BY_ID- Lnet/minecraft/util/DyeColor;BY_ID:Ljava/util/function/IntFunction;- intermediary - field_7959- Lnet/minecraft/class_1767;field_7959:Ljava/util/function/IntFunction;- official - s- Lcvn;s:Ljava/util/function/IntFunction;
 
- 
BY_FIREWORK_COLOR- Mappings:
- Namespace - Name - Mixin selector - named - BY_FIREWORK_COLOR- Lnet/minecraft/util/DyeColor;BY_FIREWORK_COLOR:Lit/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap;- intermediary - field_7950- Lnet/minecraft/class_1767;field_7950:Lit/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap;- official - t- Lcvn;t:Lit/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap;
 
- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - named - CODEC- Lnet/minecraft/util/DyeColor;CODEC:Lnet/minecraft/util/StringIdentifiable$EnumCodec;- intermediary - field_41600- Lnet/minecraft/class_1767;field_41600:Lnet/minecraft/class_3542$class_7292;- official - q- Lcvn;q:Lazv$a;
 
- 
PACKET_CODEC- Mappings:
- Namespace - Name - Mixin selector - named - PACKET_CODEC- Lnet/minecraft/util/DyeColor;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_49259- Lnet/minecraft/class_1767;field_49259:Lnet/minecraft/class_9139;- official - r- Lcvn;r:Lyn;
 
- 
idprivate final int id- Mappings:
- Namespace - Name - Mixin selector - named - id- Lnet/minecraft/util/DyeColor;id:I- intermediary - field_7965- Lnet/minecraft/class_1767;field_7965:I- official - u- Lcvn;u:I
 
- 
name- Mappings:
- Namespace - Name - Mixin selector - named - name- Lnet/minecraft/util/DyeColor;name:Ljava/lang/String;- intermediary - field_7948- Lnet/minecraft/class_1767;field_7948:Ljava/lang/String;- official - v- Lcvn;v:Ljava/lang/String;
 
- 
mapColor- Mappings:
- Namespace - Name - Mixin selector - named - mapColor- Lnet/minecraft/util/DyeColor;mapColor:Lnet/minecraft/block/MapColor;- intermediary - field_7956- Lnet/minecraft/class_1767;field_7956:Lnet/minecraft/class_3620;- official - w- Lcvn;w:Lete;
 
- 
entityColorprivate final int entityColor- Mappings:
- Namespace - Name - Mixin selector - named - entityColor- Lnet/minecraft/util/DyeColor;entityColor:I- intermediary - field_7943- Lnet/minecraft/class_1767;field_7943:I- official - x- Lcvn;x:I
 
- 
fireworkColorprivate final int fireworkColor- Mappings:
- Namespace - Name - Mixin selector - named - fireworkColor- Lnet/minecraft/util/DyeColor;fireworkColor:I- intermediary - field_7960- Lnet/minecraft/class_1767;field_7960:I- official - y- Lcvn;y:I
 
- 
signColorprivate final int signColor- Mappings:
- Namespace - Name - Mixin selector - named - signColor- Lnet/minecraft/util/DyeColor;signColor:I- intermediary - field_16537- Lnet/minecraft/class_1767;field_16537:I- official - z- Lcvn;z:I
 
 
- 
- 
Constructor Details- 
DyeColorprivate DyeColor(int id, String name, 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)V- intermediary - <init>- Lnet/minecraft/class_1767;<init>(Ljava/lang/String;IILjava/lang/String;ILnet/minecraft/class_3620;II)V- official - <init>- Lcvn;<init>(Ljava/lang/String;IILjava/lang/String;ILete;II)V
 
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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 name
- NullPointerException- if the argument is null
 
- 
getIdpublic int getId()Returns the integer ID of the dye color.- Returns:
- the integer ID of the dye color
- Mappings:
- Namespace - Name - Mixin selector - named - getId- Lnet/minecraft/util/DyeColor;getId()I- intermediary - method_7789- Lnet/minecraft/class_1767;method_7789()I- official - a- Lcvn;a()I
 
- 
getNameReturns the name of the dye color.- Returns:
- the name of the dye color
- Mappings:
- Namespace - Name - Mixin selector - named - getName- Lnet/minecraft/util/DyeColor;getName()Ljava/lang/String;- intermediary - method_7792- Lnet/minecraft/class_1767;method_7792()Ljava/lang/String;- official - b- Lcvn;b()Ljava/lang/String;
 
- 
getEntityColorpublic 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 - getEntityColor- Lnet/minecraft/util/DyeColor;getEntityColor()I- intermediary - method_7787- Lnet/minecraft/class_1767;method_7787()I- official - d- Lcvn;d()I
 
- 
getMapColorReturns the corresponding map color.- Returns:
- the corresponding map color
- Mappings:
- Namespace - Name - Mixin selector - named - getMapColor- Lnet/minecraft/util/DyeColor;getMapColor()Lnet/minecraft/block/MapColor;- intermediary - method_7794- Lnet/minecraft/class_1767;method_7794()Lnet/minecraft/class_3620;- official - e- Lcvn;e()Lete;
 
- 
getFireworkColorpublic 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 - getFireworkColor- Lnet/minecraft/util/DyeColor;getFireworkColor()I- intermediary - method_7790- Lnet/minecraft/class_1767;method_7790()I- official - f- Lcvn;f()I
 
- 
getSignColorpublic 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 - getSignColor- Lnet/minecraft/util/DyeColor;getSignColor()I- intermediary - method_16357- Lnet/minecraft/class_1767;method_16357()I- official - g- Lcvn;g()I
 
- 
byIdReturns 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 - named - byId- Lnet/minecraft/util/DyeColor;byId(I)Lnet/minecraft/util/DyeColor;- intermediary - method_7791- Lnet/minecraft/class_1767;method_7791(I)Lnet/minecraft/class_1767;- official - a- Lcvn;a(I)Lcvn;
 
- 
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 - named - byName- Lnet/minecraft/util/DyeColor;byName(Ljava/lang/String;Lnet/minecraft/util/DyeColor;)Lnet/minecraft/util/DyeColor;- intermediary - method_7793- Lnet/minecraft/class_1767;method_7793(Ljava/lang/String;Lnet/minecraft/class_1767;)Lnet/minecraft/class_1767;- official - a- Lcvn;a(Ljava/lang/String;Lcvn;)Lcvn;
 
- 
byFireworkColorReturns 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 - byFireworkColor- Lnet/minecraft/util/DyeColor;byFireworkColor(I)Lnet/minecraft/util/DyeColor;- intermediary - method_7786- Lnet/minecraft/class_1767;method_7786(I)Lnet/minecraft/class_1767;- official - b- Lcvn;b(I)Lcvn;
 
- 
toString
- 
asStringReturns the unique string representation of the enum, used for serialization.- Specified by:
- asStringin interface- StringIdentifiable
- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
- Namespace - Name - Mixin selector - named - asString- Lnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;- intermediary - method_15434- Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;- official - c- Lazv;c()Ljava/lang/String;
 
- 
mixColors- Mappings:
- Namespace - Name - Mixin selector - named - mixColors- Lnet/minecraft/util/DyeColor;mixColors(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/DyeColor;Lnet/minecraft/util/DyeColor;)Lnet/minecraft/util/DyeColor;- intermediary - method_65355- Lnet/minecraft/class_1767;method_65355(Lnet/minecraft/class_3218;Lnet/minecraft/class_1767;Lnet/minecraft/class_1767;)Lnet/minecraft/class_1767;- official - a- Lcvn;a(Lard;Lcvn;Lcvn;)Lcvn;
 
- 
createColorMixingRecipeInput- Mappings:
- Namespace - Name - Mixin selector - named - createColorMixingRecipeInput- Lnet/minecraft/util/DyeColor;createColorMixingRecipeInput(Lnet/minecraft/util/DyeColor;Lnet/minecraft/util/DyeColor;)Lnet/minecraft/recipe/input/CraftingRecipeInput;- intermediary - method_65356- Lnet/minecraft/class_1767;method_65356(Lnet/minecraft/class_1767;Lnet/minecraft/class_1767;)Lnet/minecraft/class_9694;- official - a- Lcvn;a(Lcvn;Lcvn;)Ldat;
 
 
-