Record Class LoreComponent

java.lang.Object
java.lang.Record
net.minecraft.component.type.LoreComponent
Record Components:
lines -
styledLines -
All Implemented Interfaces:
TooltipAppender

public record LoreComponent(List<Text> lines, List<Text> styledLines) extends Record implements TooltipAppender
Mappings:
Namespace Name
named net/minecraft/component/type/LoreComponent
intermediary net/minecraft/class_9290
official cxo
named lines
intermediary comp_2400
official e
named styledLines
intermediary comp_2401
official f
  • Field Details

    • lines

      private final List<Text> lines
      The field for the lines record component.
    • styledLines

      private final List<Text> styledLines
      The field for the styledLines record component.
    • DEFAULT

      public static final LoreComponent DEFAULT
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT Lnet/minecraft/component/type/LoreComponent;DEFAULT:Lnet/minecraft/component/type/LoreComponent;
      intermediary field_49340 Lnet/minecraft/class_9290;field_49340:Lnet/minecraft/class_9290;
      official a Lcxo;a:Lcxo;
    • MAX_LORES

      public static final int MAX_LORES
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_LORES Lnet/minecraft/component/type/LoreComponent;MAX_LORES:I
      intermediary field_49343 Lnet/minecraft/class_9290;field_49343:I
      official b Lcxo;b:I
    • STYLE

      private static final Style STYLE
      Mappings:
      Namespace Name Mixin selector
      named STYLE Lnet/minecraft/component/type/LoreComponent;STYLE:Lnet/minecraft/text/Style;
      intermediary field_49344 Lnet/minecraft/class_9290;field_49344:Lnet/minecraft/class_2583;
      official g Lcxo;g:Lym;
    • CODEC

      public static final com.mojang.serialization.Codec<LoreComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/component/type/LoreComponent;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49341 Lnet/minecraft/class_9290;field_49341:Lcom/mojang/serialization/Codec;
      official c Lcxo;c:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,LoreComponent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/component/type/LoreComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49342 Lnet/minecraft/class_9290;field_49342:Lnet/minecraft/class_9139;
      official d Lcxo;d:Lzn;
  • Constructor Details

    • LoreComponent

      public LoreComponent(List<Text> lines)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/component/type/LoreComponent;<init>(Ljava/util/List;)V
      intermediary <init> Lnet/minecraft/class_9290;<init>(Ljava/util/List;)V
      official <init> Lcxo;<init>(Ljava/util/List;)V
    • LoreComponent

      public LoreComponent(List<Text> list, List<Text> list2)
  • Method Details

    • with

      public LoreComponent with(Text line)
      Mappings:
      Namespace Name Mixin selector
      named with Lnet/minecraft/component/type/LoreComponent;with(Lnet/minecraft/text/Text;)Lnet/minecraft/component/type/LoreComponent;
      intermediary method_57499 Lnet/minecraft/class_9290;method_57499(Lnet/minecraft/class_2561;)Lnet/minecraft/class_9290;
      official a Lcxo;a(Lxp;)Lcxo;
    • 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
    • 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 Objects::equals(Object,Object).
      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.
    • lines

      public List<Text> lines()
      Returns the value of the lines record component.
      Returns:
      the value of the lines record component
    • styledLines

      public List<Text> styledLines()
      Returns the value of the styledLines record component.
      Returns:
      the value of the styledLines record component