Package net.minecraft.component.type
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 official cubintermediary net/minecraft/class_9290named net/minecraft/component/type/LoreComponentofficial dintermediary comp_2400named linesofficial eintermediary comp_2401named styledLines
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<LoreComponent> static final LoreComponentThe field for thelinesrecord component.private static final intstatic final PacketCodec<RegistryByteBuf, LoreComponent> private static final StyleThe field for thestyledLinesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLoreComponent(List<Text> lines) LoreComponent(List<Text> list, List<Text> list2) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTooltip(Consumer<Text> textConsumer, TooltipContext context) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.lines()Returns the value of thelinesrecord component.Returns the value of thestyledLinesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
lines
The field for thelinesrecord component. -
styledLines
The field for thestyledLinesrecord component. -
DEFAULT
- Mappings:
Namespace Name Mixin selector official aLcub;a:Lcub;intermediary field_49340Lnet/minecraft/class_9290;field_49340:Lnet/minecraft/class_9290;named DEFAULTLnet/minecraft/component/type/LoreComponent;DEFAULT:Lnet/minecraft/component/type/LoreComponent;
-
MAX_LORES
private static final int MAX_LORES- See Also:
- Mappings:
Namespace Name Mixin selector official fLcub;f:Iintermediary field_49343Lnet/minecraft/class_9290;field_49343:Inamed MAX_LORESLnet/minecraft/component/type/LoreComponent;MAX_LORES:I
-
STYLE
- Mappings:
Namespace Name Mixin selector official gLcub;g:Lxd;intermediary field_49344Lnet/minecraft/class_9290;field_49344:Lnet/minecraft/class_2583;named STYLELnet/minecraft/component/type/LoreComponent;STYLE:Lnet/minecraft/text/Style;
-
CODEC
- Mappings:
Namespace Name Mixin selector official bLcub;b:Lcom/mojang/serialization/Codec;intermediary field_49341Lnet/minecraft/class_9290;field_49341:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/component/type/LoreComponent;CODEC:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector official cLcub;c:Lye;intermediary field_49342Lnet/minecraft/class_9290;field_49342:Lnet/minecraft/class_9139;named PACKET_CODECLnet/minecraft/component/type/LoreComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
-
Constructor Details
-
LoreComponent
- Mappings:
Namespace Name Mixin selector official <init>Lcub;<init>(Ljava/util/List;)Vintermediary <init>Lnet/minecraft/class_9290;<init>(Ljava/util/List;)Vnamed <init>Lnet/minecraft/component/type/LoreComponent;<init>(Ljava/util/List;)V
-
LoreComponent
-
-
Method Details
-
of
- Mappings:
Namespace Name Mixin selector official aLcub;a(Lwg;)Lcub;intermediary method_57499Lnet/minecraft/class_9290;method_57499(Lnet/minecraft/class_2561;)Lnet/minecraft/class_9290;named ofLnet/minecraft/component/type/LoreComponent;of(Lnet/minecraft/text/Text;)Lnet/minecraft/component/type/LoreComponent;
-
appendTooltip
- Specified by:
appendTooltipin interfaceTooltipAppender- Mappings:
Namespace Name Mixin selector official aLcuj;a(Ljava/util/function/Consumer;Lcsz;)Vintermediary method_57409Lnet/minecraft/class_9299;method_57409(Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)Vnamed appendTooltipLnet/minecraft/item/TooltipAppender;appendTooltip(Ljava/util/function/Consumer;Lnet/minecraft/client/item/TooltipContext;)V
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
lines
Returns the value of thelinesrecord component.- Returns:
- the value of the
linesrecord component
-
styledLines
Returns the value of thestyledLinesrecord component.- Returns:
- the value of the
styledLinesrecord component
-