Enum Class DyeColor

java.lang.Object
java.lang.Enum<DyeColor>
net.minecraft.world.item.DyeColor
All Implemented Interfaces:
Serializable, Comparable<DyeColor>, Constable, StringRepresentable

public enum DyeColor extends Enum<DyeColor> implements StringRepresentable
  • 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

    • BY_ID

      private static final IntFunction<DyeColor> BY_ID
    • BY_FIREWORK_COLOR

      private static final it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<DyeColor> BY_FIREWORK_COLOR
    • CODEC

      public static final StringRepresentable.EnumCodec<DyeColor> CODEC
    • id

      private final int id
    • name

      private final String name
    • color

      private final MaterialColor color
    • textureDiffuseColors

      private final float[] textureDiffuseColors
    • fireworkColor

      private final int fireworkColor
    • tag

      private final TagKey<Item> tag
    • textColor

      private final int textColor
  • Constructor Details

    • DyeColor

      private DyeColor(int p_41046_, String p_41047_, int p_41048_, MaterialColor p_41049_, int p_41050_, int p_41051_)
  • Method Details

    • values

      public static DyeColor[] 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

      public static DyeColor valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getId

      public int getId()
    • getName

      public String getName()
    • getTextureDiffuseColors

      public float[] getTextureDiffuseColors()
    • getMaterialColor

      public MaterialColor getMaterialColor()
    • getFireworkColor

      public int getFireworkColor()
    • getTextColor

      public int getTextColor()
    • byId

      public static DyeColor byId(int p_41054_)
    • byName

      @Nullable @Contract("_,!null->!null;_,null->_") public static DyeColor byName(String p_41058_, @Nullable DyeColor p_41059_)
    • byFireworkColor

      @Nullable public static DyeColor byFireworkColor(int p_41062_)
    • toString

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

      public String getSerializedName()
      Specified by:
      getSerializedName in interface StringRepresentable
    • getTag

      public TagKey<Item> getTag()
    • getColor

      @Nullable public static DyeColor getColor(ItemStack stack)