Enum DyeColor

java.lang.Object
java.lang.Enum<DyeColor>
net.minecraft.util.DyeColor
All Implemented Interfaces:
Serializable, Comparable<DyeColor>, java.lang.constant.Constable, StringIdentifiable

public enum DyeColor
extends Enum<DyeColor>
implements StringIdentifiable
  • Enum Constant Details

    • WHITE

      public static final DyeColor WHITE
    • ORANGE

      public static final DyeColor ORANGE
    • MAGENTA

      public static final DyeColor MAGENTA
    • LIGHT_BLUE

      public static final DyeColor LIGHT_BLUE
    • YELLOW

      public static final DyeColor YELLOW
    • LIME

      public static final DyeColor LIME
    • PINK

      public static final DyeColor PINK
    • GRAY

      public static final DyeColor GRAY
    • LIGHT_GRAY

      public static final DyeColor LIGHT_GRAY
    • CYAN

      public static final DyeColor CYAN
    • PURPLE

      public static final DyeColor PURPLE
    • BLUE

      public static final DyeColor BLUE
    • BROWN

      public static final DyeColor BROWN
    • GREEN

      public static final DyeColor GREEN
    • RED

      public static final DyeColor RED
    • BLACK

      public static final DyeColor BLACK
  • Field Details

    • VALUES

      private static final DyeColor[] VALUES
    • BY_FIREWORK_COLOR

      private static final Int2ObjectOpenHashMap<DyeColor> BY_FIREWORK_COLOR
    • id

      private final int id
    • name

      private final String name
    • materialColor

      private final MaterialColor materialColor
    • color

      private final int color
    • colorSwapped

      private final int colorSwapped
    • colorComponents

      private final float[] colorComponents
    • fireworkColor

      private final int fireworkColor
    • signColor

      private final int signColor
  • Constructor Details

    • DyeColor

      private DyeColor​(int woolId, String name, int color, MaterialColor materialColor, int fireworkColor, int signColor)
  • Method Details

    • values

      public static DyeColor[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DyeColor valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getId

      public int getId()
    • getName

      public String getName()
    • getColorComponents

      public float[] getColorComponents()
    • getMaterialColor

      public MaterialColor getMaterialColor()
    • getFireworkColor

      public int getFireworkColor()
    • getSignColor

      @Environment(CLIENT) public int getSignColor()
    • byId

      public static DyeColor byId​(int id)
    • byName

      public static DyeColor byName​(String name, DyeColor defaultColor)
    • byFireworkColor

      @Environment(CLIENT) @Nullable public static DyeColor byFireworkColor​(int color)
    • toString

      public String toString()
      Overrides:
      toString in class Enum<DyeColor>
    • asString

      public String asString()
      Specified by:
      asString in interface StringIdentifiable