Enum Class DyeColor
- All Implemented Interfaces:
Serializable, Comparable<DyeColor>, Constable, StringRepresentable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface StringRepresentable
StringRepresentable.EnumCodec<E>, StringRepresentable.StringRepresentableCodec<S> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<DyeColor> private static final IntFunction<DyeColor> static final StringRepresentable.EnumCodec<DyeColor> private final intprivate final intstatic final com.mojang.serialization.Codec<DyeColor> Deprecated.private final MapColorprivate final Stringstatic final StreamCodec<io.netty.buffer.ByteBuf, DyeColor> private final intprivate final intFields inherited from interface StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable DyeColorbyFireworkColor(int color) static DyeColorbyId(int id) static @Nullable DyeColorprivate static @Nullable DyeColorfindColorMixInRecipes(ServerLevel level, DyeColor dyeColor1, DyeColor dyeColor2) static @Nullable DyeColorGets the tag key representing the set of items which are dyed with this color.intintgetId()static DyeColorgetMixedColor(ServerLevel level, DyeColor dyeColor1, DyeColor dyeColor2) getName()getTag()Gets the tag key representing the set of items which provide this dye color.intinttoString()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
-
ORANGE
-
MAGENTA
-
LIGHT_BLUE
-
YELLOW
-
LIME
-
PINK
-
GRAY
-
LIGHT_GRAY
-
CYAN
-
PURPLE
-
BLUE
-
BROWN
-
GREEN
-
RED
-
BLACK
-
-
Field Details
-
VALUES
-
BY_ID
-
BY_FIREWORK_COLOR
-
CODEC
-
STREAM_CODEC
-
LEGACY_ID_CODEC
Deprecated. -
id
private final int id -
name
-
mapColor
-
textureDiffuseColor
private final int textureDiffuseColor -
fireworkColor
private final int fireworkColor -
dyesTag
-
dyedTag
-
textColor
private final int textColor
-
-
Constructor Details
-
DyeColor
-
-
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() -
getName
-
getTextureDiffuseColor
public int getTextureDiffuseColor() -
getMapColor
-
getFireworkColor
public int getFireworkColor() -
getTextColor
public int getTextColor() -
byId
-
byName
-
byFireworkColor
-
toString
-
getSerializedName
- Specified by:
getSerializedNamein interfaceStringRepresentable
-
getTag
-
getDyedTag
-
getColor
-
getMixedColor
-
findColorMixInRecipes
private static @Nullable DyeColor findColorMixInRecipes(ServerLevel level, DyeColor dyeColor1, DyeColor dyeColor2)
-