Package net.minecraft.text
Record Class SelectorTextContent
java.lang.Object
java.lang.Record
net.minecraft.text.SelectorTextContent
- Record Components:
- selector-
- separator-
- All Implemented Interfaces:
- TextContent
public record SelectorTextContent(ParsedSelector selector, Optional<Text> separator)
extends Record
implements TextContent
- Mappings:
- Namespace - Name - named - net/minecraft/text/SelectorTextContent- intermediary - net/minecraft/class_2579- official - xy- named - selector- intermediary - comp_3080- official - c- named - separator- intermediary - comp_3081- official - d
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.text.TextContentTextContent.Type<T extends TextContent>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SelectorTextContent> private final ParsedSelectorThe field for theselectorrecord component.The field for theseparatorrecord component.static final TextContent.Type<SelectorTextContent> 
- 
Constructor SummaryConstructorsConstructorDescriptionSelectorTextContent(ParsedSelector parsedSelector, Optional<Text> separator) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.parse(@Nullable ServerCommandSource source, @Nullable Entity sender, int depth) Parses this content into a basic mutable text without custom style or siblings.selector()Returns the value of theselectorrecord component.Returns the value of theseparatorrecord component.toString()Returns a string representation of this record class.<T> Optional<T> visit(StringVisitable.StyledVisitor<T> visitor, Style style) Visits this content.<T> Optional<T> visit(StringVisitable.Visitor<T> visitor) Visits this content.
- 
Field Details- 
selectorThe field for theselectorrecord component.
- 
separatorThe field for theseparatorrecord component.
- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - named - CODEC- Lnet/minecraft/text/SelectorTextContent;CODEC:Lcom/mojang/serialization/MapCodec;- intermediary - field_46629- Lnet/minecraft/class_2579;field_46629:Lcom/mojang/serialization/MapCodec;- official - a- Lxy;a:Lcom/mojang/serialization/MapCodec;
 
- 
TYPE- Mappings:
- Namespace - Name - Mixin selector - named - TYPE- Lnet/minecraft/text/SelectorTextContent;TYPE:Lnet/minecraft/text/TextContent$Type;- intermediary - field_46630- Lnet/minecraft/class_2579;field_46630:Lnet/minecraft/class_7417$class_8823;- official - b- Lxy;b:Lwq$a;
 
 
- 
- 
Constructor Details- 
SelectorTextContent- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/text/SelectorTextContent;<init>(Lnet/minecraft/text/ParsedSelector;Ljava/util/Optional;)V- intermediary - <init>- Lnet/minecraft/class_2579;<init>(Lnet/minecraft/class_10104;Ljava/util/Optional;)V- official - <init>- Lxy;<init>(Lho;Ljava/util/Optional;)V
 
 
- 
- 
Method Details- 
getType- Specified by:
- getTypein interface- TextContent
- Mappings:
- Namespace - Name - Mixin selector - named - getType- Lnet/minecraft/text/TextContent;getType()Lnet/minecraft/text/TextContent$Type;- intermediary - method_54163- Lnet/minecraft/class_7417;method_54163()Lnet/minecraft/class_7417$class_8823;- official - a- Lwq;a()Lwq$a;
 
- 
parsepublic MutableText parse(@Nullable @Nullable ServerCommandSource source, @Nullable @Nullable Entity sender, int depth) throws com.mojang.brigadier.exceptions.CommandSyntaxException Parses this content into a basic mutable text without custom style or siblings. The resulting text may or may not have this content.- Specified by:
- parsein interface- TextContent
- Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
- Namespace - Name - Mixin selector - named - parse- Lnet/minecraft/text/TextContent;parse(Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/entity/Entity;I)Lnet/minecraft/text/MutableText;- intermediary - method_10890- Lnet/minecraft/class_7417;method_10890(Lnet/minecraft/class_2168;Lnet/minecraft/class_1297;I)Lnet/minecraft/class_5250;- official - a- Lwq;a(Lex;Lbum;I)Lxd;
 
- 
visitVisits this content. Returns a value if the visitor terminates amid the visit, orOptional.empty()if it proceeds.- Specified by:
- visitin interface- TextContent
- Returns:
- Optional.empty()if the visit finished, or a terminating result from the- visitor
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - visit- Lnet/minecraft/text/TextContent;visit(Lnet/minecraft/text/StringVisitable$StyledVisitor;Lnet/minecraft/text/Style;)Ljava/util/Optional;- intermediary - method_27660- Lnet/minecraft/class_7417;method_27660(Lnet/minecraft/class_5348$class_5246;Lnet/minecraft/class_2583;)Ljava/util/Optional;- official - a- Lwq;a(Lwu$b;Lxm;)Ljava/util/Optional;
 
- 
visitVisits this content. Returns a value if the visitor terminates amid the visit, orOptional.empty()if it proceeds.- Specified by:
- visitin interface- TextContent
- Returns:
- Optional.empty()if the visit finished, or a terminating result from the- visitor
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - visit- Lnet/minecraft/text/TextContent;visit(Lnet/minecraft/text/StringVisitable$Visitor;)Ljava/util/Optional;- intermediary - method_27659- Lnet/minecraft/class_7417;method_27659(Lnet/minecraft/class_5348$class_5245;)Ljava/util/Optional;- official - a- Lwq;a(Lwu$a;)Ljava/util/Optional;
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
selectorReturns the value of theselectorrecord component.- Returns:
- the value of the selectorrecord component
 
- 
separatorReturns the value of theseparatorrecord component.- Returns:
- the value of the separatorrecord component
 
 
-