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 named net/minecraft/component/type/LoreComponentintermediary net/minecraft/class_9290official dddnamed linesintermediary comp_2400official enamed styledLinesintermediary comp_2401official f
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<LoreComponent> static final LoreComponentThe field for thelinesrecord component.static final intstatic final PacketCodec<RegistryByteBuf, LoreComponent> private static final StyleThe field for thestyledLinesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLoreComponent(List<Text> lines) LoreComponent(List<Text> lines, List<Text> styledLines) Creates an instance of aLoreComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTooltip(Item.TooltipContext context, Consumer<Text> textConsumer, TooltipType type, ComponentsAccess components) 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 named DEFAULTLnet/minecraft/component/type/LoreComponent;DEFAULT:Lnet/minecraft/component/type/LoreComponent;intermediary field_49340Lnet/minecraft/class_9290;field_49340:Lnet/minecraft/class_9290;official aLddd;a:Lddd;
-
MAX_LORES
public static final int MAX_LORES- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_LORESLnet/minecraft/component/type/LoreComponent;MAX_LORES:Iintermediary field_49343Lnet/minecraft/class_9290;field_49343:Iofficial bLddd;b:I
-
STYLE
- Mappings:
Namespace Name Mixin selector named STYLELnet/minecraft/component/type/LoreComponent;STYLE:Lnet/minecraft/text/Style;intermediary field_49344Lnet/minecraft/class_9290;field_49344:Lnet/minecraft/class_2583;official gLddd;g:Lyd;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/LoreComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_49341Lnet/minecraft/class_9290;field_49341:Lcom/mojang/serialization/Codec;official cLddd;c:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/LoreComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49342Lnet/minecraft/class_9290;field_49342:Lnet/minecraft/class_9139;official dLddd;d:Lze;
-
-
Constructor Details
-
LoreComponent
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/component/type/LoreComponent;<init>(Ljava/util/List;)Vintermediary <init>Lnet/minecraft/class_9290;<init>(Ljava/util/List;)Vofficial <init>Lddd;<init>(Ljava/util/List;)V
-
LoreComponent
Creates an instance of aLoreComponentrecord class.- Parameters:
lines- the value for thelinesrecord componentstyledLines- the value for thestyledLinesrecord component
-
-
Method Details
-
with
- Mappings:
Namespace Name Mixin selector named withLnet/minecraft/component/type/LoreComponent;with(Lnet/minecraft/text/Text;)Lnet/minecraft/component/type/LoreComponent;intermediary method_57499Lnet/minecraft/class_9290;method_57499(Lnet/minecraft/class_2561;)Lnet/minecraft/class_9290;official aLddd;a(Lxg;)Lddd;
-
appendTooltip
public void appendTooltip(Item.TooltipContext context, Consumer<Text> textConsumer, TooltipType type, ComponentsAccess components) - Specified by:
appendTooltipin interfaceTooltipAppender- Mappings:
Namespace Name Mixin selector named appendTooltipLnet/minecraft/item/tooltip/TooltipAppender;appendTooltip(Lnet/minecraft/item/Item$TooltipContext;Ljava/util/function/Consumer;Lnet/minecraft/item/tooltip/TooltipType;Lnet/minecraft/component/ComponentsAccess;)Vintermediary method_57409Lnet/minecraft/class_9299;method_57409(Lnet/minecraft/class_1792$class_9635;Ljava/util/function/Consumer;Lnet/minecraft/class_1836;Lnet/minecraft/class_9473;)Vofficial aLddp;a(Ldag$b;Ljava/util/function/Consumer;Ldbz;Lkg;)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
-