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 zd
named name
intermediary comp_3078
official d
named objective
intermediary comp_3079
official e
  • Field Details

    • name

      private final com.mojang.datafixers.util.Either<ParsedSelector,String> name
      The field for the name record component.
    • objective

      private final String objective
      The field for the objective record component.
    • INNER_CODEC

      public static final com.mojang.serialization.MapCodec<ScoreTextContent> 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 Lzd;a:Lcom/mojang/serialization/MapCodec;
    • CODEC

      public static final com.mojang.serialization.MapCodec<ScoreTextContent> 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 Lzd;b:Lcom/mojang/serialization/MapCodec;
    • TYPE

      public static final TextContent.Type<ScoreTextContent> 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 Lzd;c:Lxw$a;
  • Constructor Details

    • ScoreTextContent

      public 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> Lzd;<init>(Lcom/mojang/datafixers/util/Either;Ljava/lang/String;)V
  • Method Details

    • getType

      public TextContent.Type<?> getType()
      Specified by:
      getType in 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 Lxw;a()Lxw$a;
    • getScoreHolder

      private 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 Lzd;a(Lew;)Lfdb;
    • getScore

      private MutableText getScore(ScoreHolder scoreHolder, ServerCommandSource source)
      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 Lzd;a(Lfdb;Lew;)Lyj;
    • parse

      public 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:
      parse in 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 Lxw;a(Lew;Lbvj;I)Lyj;
    • toString

      public 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 o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public com.mojang.datafixers.util.Either<ParsedSelector,String> name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • objective

      public String objective()
      Returns the value of the objective record component.
      Returns:
      the value of the objective record component