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 int
Darkest Variant of the color, nearly black; as a RGB HEX Integerstatic final com.mojang.serialization.Codec
<AEColor> final int
Text color that has good contrast with the medium version of this color.final net.minecraft.world.item.DyeColor
Vanilla Dye Equivilientfinal String
English name of this color.final int
The Variant of the color that is used to represent the color normally; as a RGB HEX Integerfinal String
A 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 int
Thetint index
that can normally be used to get thebright variant
of the apprioriate AE color.static final int
Thetint index
that can normally be used to get thedark variant
of the apprioriate AE color.static final int
Thetint index
that can normally be used to get themedium variant
of the apprioriate AE color.static final int
Thetint index
that can normally be used to get a color between themedium
andbright variant
of the apprioriate AE color.final String
Unlocalized name for color.final int
Lightest 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 AEColor
fromDye
(net.minecraft.world.item.DyeColor vanillaDye) int
getVariantByTintIndex
(int tintIndex) Will return a variant of this color based on the given tint index.toString()
static AEColor
Returns 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 index
that can normally be used to get thedark variant
of the apprioriate AE color.- See Also:
-
TINTINDEX_MEDIUM
public static final int TINTINDEX_MEDIUMThetint index
that can normally be used to get themedium variant
of the apprioriate AE color.- See Also:
-
TINTINDEX_BRIGHT
public static final int TINTINDEX_BRIGHTThetint index
that can normally be used to get thebright variant
of the apprioriate AE color.- See Also:
-
TINTINDEX_MEDIUM_BRIGHT
public static final int TINTINDEX_MEDIUM_BRIGHTThetint index
that can normally be used to get a color between themedium
andbright variant
of 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:
getSerializedName
in interfacenet.minecraft.util.StringRepresentable
-