Package appeng.api.util
Enum Class AEColor
- All Implemented Interfaces:
Serializable,Comparable<AEColor>,Constable,net.minecraft.util.StringRepresentable
List of all colors supported by AE, their names, and various colors for display.
Should be the same order as Dyes, excluding Transparent.
-
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.StringRepresentable
net.minecraft.util.StringRepresentable.EnumCodec<E extends Enum<E> & net.minecraft.util.StringRepresentable>, net.minecraft.util.StringRepresentable.StringRepresentableCodec<S extends net.minecraft.util.StringRepresentable> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intDarkest Variant of the color, nearly black; as a RGB HEX Integerstatic final com.mojang.serialization.Codec<AEColor> final intText color that has good contrast with the medium version of this color.final net.minecraft.world.item.DyeColorVanilla Dye Equivilientfinal StringEnglish name of this color.final intThe Variant of the color that is used to represent the color normally; as a RGB HEX Integerfinal StringA convenient ID prefix for use with registering color variants of items and blocks.static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, AEColor> static final intThetint indexthat can normally be used to get thebright variantof the apprioriate AE color.static final intThetint indexthat can normally be used to get thedark variantof the apprioriate AE color.static final intThetint indexthat can normally be used to get themedium variantof the apprioriate AE color.static final intThetint indexthat can normally be used to get a color between themediumandbright variantof the apprioriate AE color.final StringUnlocalized name for color.final intLightest Variant of the color, nearly white; as a RGB HEX IntegerFields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Method Summary
Modifier and TypeMethodDescriptionstatic AEColorfromDye(net.minecraft.world.item.DyeColor vanillaDye) intgetVariantByTintIndex(int tintIndex) Will return a variant of this color based on the given tint index.toString()static AEColorReturns the enum constant of this class with the specified name.static AEColor[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WHITE
-
LIGHT_GRAY
-
GRAY
-
BLACK
-
LIME
-
YELLOW
-
ORANGE
-
BROWN
-
RED
-
PINK
-
MAGENTA
-
PURPLE
-
BLUE
-
LIGHT_BLUE
-
CYAN
-
GREEN
-
TRANSPARENT
-
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,AEColor> STREAM_CODEC -
VALID_COLORS
-
TINTINDEX_DARK
public static final int TINTINDEX_DARKThetint indexthat can normally be used to get thedark variantof the apprioriate AE color.- See Also:
-
TINTINDEX_MEDIUM
public static final int TINTINDEX_MEDIUMThetint indexthat can normally be used to get themedium variantof the apprioriate AE color.- See Also:
-
TINTINDEX_BRIGHT
public static final int TINTINDEX_BRIGHTThetint indexthat can normally be used to get thebright variantof the apprioriate AE color.- See Also:
-
TINTINDEX_MEDIUM_BRIGHT
public static final int TINTINDEX_MEDIUM_BRIGHTThetint indexthat can normally be used to get a color between themediumandbright variantof the apprioriate AE color.- See Also:
-
translationKey
Unlocalized name for color. -
blackVariant
public final int blackVariantDarkest Variant of the color, nearly black; as a RGB HEX Integer -
mediumVariant
public final int mediumVariantThe Variant of the color that is used to represent the color normally; as a RGB HEX Integer -
whiteVariant
public final int whiteVariantLightest Variant of the color, nearly white; as a RGB HEX Integer -
dye
public final net.minecraft.world.item.DyeColor dyeVanilla Dye Equivilient -
registryPrefix
A convenient ID prefix for use with registering color variants of items and blocks. -
englishName
English name of this color. -
contrastTextColor
public final int contrastTextColorText color that has good contrast with the medium version of this color.
-
-
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
-
fromDye
-
getVariantByTintIndex
public int getVariantByTintIndex(int tintIndex) Will return a variant of this color based on the given tint index.- Parameters:
tintIndex- A tint index as it can be used forBakedQuad.getTintIndex().- Returns:
- The appropriate color variant, or -1.
-
getEnglishName
-
toString
-
getSerializedName
- Specified by:
getSerializedNamein interfacenet.minecraft.util.StringRepresentable
-