Class Color

java.lang.Object
net.minecraft.util.text.Color

public final class Color extends Object
  • Field Details

    • LEGACY_FORMAT_TO_COLOR

      private static final Map<TextFormatting,Color> LEGACY_FORMAT_TO_COLOR
    • NAMED_COLORS

      private static final Map<String,Color> NAMED_COLORS
    • value

      private final int value
    • name

      @Nullable private final String name
  • Constructor Details

    • Color

      private Color(int p_i232573_1_, String p_i232573_2_)
    • Color

      private Color(int p_i232572_1_)
  • Method Details

    • getValue

      public int getValue()
    • serialize

      public String serialize()
    • formatValue

      private String formatValue()
    • equals

      public boolean equals(Object p_equals_1_)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class 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(String p_240745_0_)