Package net.minecraft.util.text
Class Color
- java.lang.Object
-
- net.minecraft.util.text.Color
-
public final class Color extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<TextFormatting,Color>
LEGACY_FORMAT_TO_COLOR
private java.lang.String
name
private static java.util.Map<java.lang.String,Color>
NAMED_COLORS
private int
value
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object p_equals_1_)
private java.lang.String
formatValue()
static Color
fromLegacyFormat(TextFormatting p_240744_0_)
static Color
fromRgb(int p_240743_0_)
int
getValue()
int
hashCode()
static Color
parseColor(java.lang.String p_240745_0_)
java.lang.String
serialize()
java.lang.String
toString()
-
-
-
Field Detail
-
LEGACY_FORMAT_TO_COLOR
private static final java.util.Map<TextFormatting,Color> LEGACY_FORMAT_TO_COLOR
-
NAMED_COLORS
private static final java.util.Map<java.lang.String,Color> NAMED_COLORS
-
value
private final int value
-
name
@Nullable private final java.lang.String name
-
-
Method Detail
-
getValue
public int getValue()
-
serialize
public java.lang.String serialize()
-
formatValue
private java.lang.String formatValue()
-
equals
public boolean equals(java.lang.Object p_equals_1_)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
fromLegacyFormat
@Nullable public static Color fromLegacyFormat(TextFormatting p_240744_0_)
-
fromRgb
public static Color fromRgb(int p_240743_0_)
-
parseColor
@Nullable public static Color parseColor(java.lang.String p_240745_0_)
-
-