Record Class DyedColorComponent

java.lang.Object
java.lang.Record
net.minecraft.component.type.DyedColorComponent
Record Components:
rgb -
showInTooltip -
All Implemented Interfaces:
TooltipAppender

public record DyedColorComponent(int rgb, boolean showInTooltip) extends Record implements TooltipAppender
Mappings:
Namespace Name
named net/minecraft/component/type/DyedColorComponent
intermediary net/minecraft/class_9282
official cxj
named rgb
intermediary comp_2384
official d
named showInTooltip
intermediary comp_2385
official e
  • Field Details

    • rgb

      private final int rgb
      The field for the rgb record component.
    • showInTooltip

      private final boolean showInTooltip
      The field for the showInTooltip record component.
    • BASE_CODEC

      private static final com.mojang.serialization.Codec<DyedColorComponent> BASE_CODEC
      Mappings:
      Namespace Name Mixin selector
      named BASE_CODEC Lnet/minecraft/component/type/DyedColorComponent;BASE_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49750 Lnet/minecraft/class_9282;field_49750:Lcom/mojang/serialization/Codec;
      official f Lcxj;f:Lcom/mojang/serialization/Codec;
    • CODEC

      public static final com.mojang.serialization.Codec<DyedColorComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/component/type/DyedColorComponent;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49312 Lnet/minecraft/class_9282;field_49312:Lcom/mojang/serialization/Codec;
      official a Lcxj;a:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<ByteBuf,DyedColorComponent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/component/type/DyedColorComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49313 Lnet/minecraft/class_9282;field_49313:Lnet/minecraft/class_9139;
      official b Lcxj;b:Lzn;
    • DEFAULT_COLOR

      public static final int DEFAULT_COLOR
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT_COLOR Lnet/minecraft/component/type/DyedColorComponent;DEFAULT_COLOR:I
      intermediary field_49314 Lnet/minecraft/class_9282;field_49314:I
      official c Lcxj;c:I
  • Constructor Details

    • DyedColorComponent

      public DyedColorComponent(int int2, boolean bool)
  • Method Details

    • getColor

      public static int getColor(ItemStack stack, int defaultColor)
      Mappings:
      Namespace Name Mixin selector
      named getColor Lnet/minecraft/component/type/DyedColorComponent;getColor(Lnet/minecraft/item/ItemStack;I)I
      intermediary method_57470 Lnet/minecraft/class_9282;method_57470(Lnet/minecraft/class_1799;I)I
      official a Lcxj;a(Lcur;I)I
    • setColor

      public static ItemStack setColor(ItemStack stack, List<DyeItem> dyes)
      Mappings:
      Namespace Name Mixin selector
      named setColor Lnet/minecraft/component/type/DyedColorComponent;setColor(Lnet/minecraft/item/ItemStack;Ljava/util/List;)Lnet/minecraft/item/ItemStack;
      intermediary method_57471 Lnet/minecraft/class_9282;method_57471(Lnet/minecraft/class_1799;Ljava/util/List;)Lnet/minecraft/class_1799;
      official a Lcxj;a(Lcur;Ljava/util/List;)Lcur;
    • appendTooltip

      public void appendTooltip(Item.TooltipContext context, Consumer<Text> tooltip, TooltipType type)
      Specified by:
      appendTooltip in interface TooltipAppender
      Mappings:
      Namespace Name Mixin selector
      named appendTooltip Lnet/minecraft/item/TooltipAppender;appendTooltip(Lnet/minecraft/item/Item$TooltipContext;Ljava/util/function/Consumer;Lnet/minecraft/client/item/TooltipType;)V
      intermediary method_57409 Lnet/minecraft/class_9299;method_57409(Lnet/minecraft/class_1792$class_9635;Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)V
      official a Lcxx;a(Lcum$b;Ljava/util/function/Consumer;Lcwk;)V
    • withShowInTooltip

      public DyedColorComponent withShowInTooltip(boolean showInTooltip)
      Mappings:
      Namespace Name Mixin selector
      named withShowInTooltip Lnet/minecraft/component/type/DyedColorComponent;withShowInTooltip(Z)Lnet/minecraft/component/type/DyedColorComponent;
      intermediary method_58422 Lnet/minecraft/class_9282;method_58422(Z)Lnet/minecraft/class_9282;
      official a Lcxj;a(Z)Lcxj;
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • rgb

      public int rgb()
      Returns the value of the rgb record component.
      Returns:
      the value of the rgb record component
    • showInTooltip

      public boolean showInTooltip()
      Returns the value of the showInTooltip record component.
      Returns:
      the value of the showInTooltip record component