Package net.minecraft.text
Record Class ScoreTextContent
java.lang.Object
java.lang.Record
net.minecraft.text.ScoreTextContent
- Record Components:
- name-
- objective-
- All Implemented Interfaces:
- TextContent
public record ScoreTextContent(com.mojang.datafixers.util.Either<ParsedSelector,String> name, String objective)
extends Record
implements TextContent 
- Mappings:
- Namespace - Name - named - net/minecraft/text/ScoreTextContent- intermediary - net/minecraft/class_2578- official - xx- named - name- intermediary - comp_3078- official - d- named - objective- intermediary - comp_3079- official - e
- 
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<ScoreTextContent> static final com.mojang.serialization.MapCodec<ScoreTextContent> private final com.mojang.datafixers.util.Either<ParsedSelector, String> The field for thenamerecord component.private final StringThe field for theobjectiverecord component.static final TextContent.Type<ScoreTextContent> 
- 
Constructor SummaryConstructorsConstructorDescriptionScoreTextContent(com.mojang.datafixers.util.Either<ParsedSelector, String> either, String objective) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.private MutableTextgetScore(ScoreHolder scoreHolder, ServerCommandSource source) private ScoreHoldergetScoreHolder(ServerCommandSource source) getType()final inthashCode()Returns a hash code value for this object.com.mojang.datafixers.util.Either<ParsedSelector, String> name()Returns the value of thenamerecord component.Returns the value of theobjectiverecord component.parse(@Nullable ServerCommandSource source, @Nullable Entity sender, int depth) Parses this content into a basic mutable text without custom style or siblings.toString()Returns a string representation of this record class.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.text.TextContentvisit, visit
- 
Field Details- 
nameThe field for thenamerecord component.
- 
objectiveThe field for theobjectiverecord component.
- 
INNER_CODEC- Mappings:
- Namespace - Name - Mixin selector - named - INNER_CODEC- Lnet/minecraft/text/ScoreTextContent;INNER_CODEC:Lcom/mojang/serialization/MapCodec;- intermediary - field_46626- Lnet/minecraft/class_2578;field_46626:Lcom/mojang/serialization/MapCodec;- official - a- Lxx;a:Lcom/mojang/serialization/MapCodec;
 
- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - named - CODEC- Lnet/minecraft/text/ScoreTextContent;CODEC:Lcom/mojang/serialization/MapCodec;- intermediary - field_46627- Lnet/minecraft/class_2578;field_46627:Lcom/mojang/serialization/MapCodec;- official - b- Lxx;b:Lcom/mojang/serialization/MapCodec;
 
- 
TYPE- Mappings:
- Namespace - Name - Mixin selector - named - TYPE- Lnet/minecraft/text/ScoreTextContent;TYPE:Lnet/minecraft/text/TextContent$Type;- intermediary - field_46628- Lnet/minecraft/class_2578;field_46628:Lnet/minecraft/class_7417$class_8823;- official - c- Lxx;c:Lwq$a;
 
 
- 
- 
Constructor Details- 
ScoreTextContentpublic ScoreTextContent(com.mojang.datafixers.util.Either<ParsedSelector, String> either, String objective) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/text/ScoreTextContent;<init>(Lcom/mojang/datafixers/util/Either;Ljava/lang/String;)V- intermediary - <init>- Lnet/minecraft/class_2578;<init>(Lcom/mojang/datafixers/util/Either;Ljava/lang/String;)V- official - <init>- Lxx;<init>(Lcom/mojang/datafixers/util/Either;Ljava/lang/String;)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;
 
- 
getScoreHolderprivate ScoreHolder getScoreHolder(ServerCommandSource source) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
- Namespace - Name - Mixin selector - named - getScoreHolder- Lnet/minecraft/text/ScoreTextContent;getScoreHolder(Lnet/minecraft/server/command/ServerCommandSource;)Lnet/minecraft/scoreboard/ScoreHolder;- intermediary - method_27699- Lnet/minecraft/class_2578;method_27699(Lnet/minecraft/class_2168;)Lnet/minecraft/class_9015;- official - a- Lxx;a(Lex;)Lfcf;
 
- 
getScore- Mappings:
- Namespace - Name - Mixin selector - named - getScore- Lnet/minecraft/text/ScoreTextContent;getScore(Lnet/minecraft/scoreboard/ScoreHolder;Lnet/minecraft/server/command/ServerCommandSource;)Lnet/minecraft/text/MutableText;- intermediary - method_27700- Lnet/minecraft/class_2578;method_27700(Lnet/minecraft/class_9015;Lnet/minecraft/class_2168;)Lnet/minecraft/class_5250;- official - a- Lxx;a(Lfcf;Lex;)Lxd;
 
- 
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;
 
- 
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).
- 
nameReturns the value of thenamerecord component.- Returns:
- the value of the namerecord component
 
- 
objectiveReturns the value of theobjectiverecord component.- Returns:
- the value of the objectiverecord component
 
 
-