枚举类 DyeColor

java.lang.Object
java.lang.Enum<DyeColor>
net.minecraft.world.item.DyeColor
所有已实现的接口:
Serializable, Comparable<DyeColor>, Constable, StringRepresentable

public enum DyeColor extends Enum<DyeColor> implements StringRepresentable
  • 枚举常量详细资料

    • 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
  • 字段详细资料

    • 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
    • STREAM_CODEC

      public static final StreamCodec<io.netty.buffer.ByteBuf,DyeColor> STREAM_CODEC
    • LEGACY_ID_CODEC

      @Deprecated public static final com.mojang.serialization.Codec<DyeColor> LEGACY_ID_CODEC
      已过时。
    • id

      private final int id
    • name

      private final String name
    • mapColor

      private final MapColor mapColor
    • textureDiffuseColor

      private final int textureDiffuseColor
    • fireworkColor

      private final int fireworkColor
    • dyesTag

      private final TagKey<Item> dyesTag
    • dyedTag

      private final TagKey<Item> dyedTag
    • textColor

      private final int textColor
  • 构造器详细资料

    • DyeColor

      private DyeColor(int p_41046_, String p_41047_, int p_41048_, MapColor p_285297_, int p_41050_, int p_41051_)
  • 方法详细资料

    • values

      public static DyeColor[] values()
      返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同
      返回:
      包含该枚举类的常量的数组,顺序与声明这些常量的顺序相同
    • valueOf

      public static DyeColor valueOf(String name)
      返回带有指定名称的该类的枚举常量。 字符串必须与用于声明该类的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - 如果该枚举类没有带有指定名称的常量
      NullPointerException - 如果参数为空值
    • getId

      public int getId()
    • getName

      public String getName()
    • getTextureDiffuseColor

      public int getTextureDiffuseColor()
    • getMapColor

      public MapColor getMapColor()
    • 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()
      覆盖:
      toString 在类中 Enum<DyeColor>
    • getSerializedName

      public String getSerializedName()
      指定者:
      getSerializedName 在接口中 StringRepresentable
    • getTag

      public TagKey<Item> getTag()
      Gets the tag key representing the set of items which provide this dye color.
      返回:
      A TagKey<Item> representing the set of items which provide this dye color.
    • getDyedTag

      public TagKey<Item> getDyedTag()
      Gets the tag key representing the set of items which are dyed with this color.
      返回:
      A TagKey<Item> representing the set of items which are dyed with this color.
    • getColor

      @Nullable public static DyeColor getColor(ItemStack stack)
    • getMixedColor

      public static DyeColor getMixedColor(ServerLevel p_386897_, DyeColor p_388832_, DyeColor p_386710_)
    • makeCraftColorInput

      private static CraftingInput makeCraftColorInput(DyeColor p_388241_, DyeColor p_387649_)