Class SelectorTextContent

java.lang.Object
net.minecraft.text.SelectorTextContent
All Implemented Interfaces:
TextContent

public class SelectorTextContent extends Object implements TextContent
Mappings:
Namespace Name
named net/minecraft/text/SelectorTextContent
intermediary net/minecraft/class_2579
official yi
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/text/SelectorTextContent;LOGGER:Lorg/slf4j/Logger;
      intermediary field_11791 Lnet/minecraft/class_2579;field_11791:Lorg/slf4j/Logger;
      official d Lyi;d:Lorg/slf4j/Logger;
    • CODEC

      public static final com.mojang.serialization.MapCodec<SelectorTextContent> 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 Lyi;a:Lcom/mojang/serialization/MapCodec;
    • TYPE

      public static final TextContent.Type<SelectorTextContent> 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 Lyi;b:Lxa$a;
    • pattern

      private final String pattern
      Mappings:
      Namespace Name Mixin selector
      named pattern Lnet/minecraft/text/SelectorTextContent;pattern:Ljava/lang/String;
      intermediary field_11789 Lnet/minecraft/class_2579;field_11789:Ljava/lang/String;
      official e Lyi;e:Ljava/lang/String;
    • selector

      @Nullable private final @Nullable EntitySelector selector
      Mappings:
      Namespace Name Mixin selector
      named selector Lnet/minecraft/text/SelectorTextContent;selector:Lnet/minecraft/command/EntitySelector;
      intermediary field_11790 Lnet/minecraft/class_2579;field_11790:Lnet/minecraft/class_2300;
      official f Lyi;f:Lhi;
    • separator

      protected final Optional<Text> separator
      Mappings:
      Namespace Name Mixin selector
      named separator Lnet/minecraft/text/SelectorTextContent;separator:Ljava/util/Optional;
      intermediary field_33540 Lnet/minecraft/class_2579;field_33540:Ljava/util/Optional;
      official c Lyi;c:Ljava/util/Optional;
  • Constructor Details

    • SelectorTextContent

      public SelectorTextContent(String pattern, Optional<Text> separator)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/text/SelectorTextContent;<init>(Ljava/lang/String;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_2579;<init>(Ljava/lang/String;Ljava/util/Optional;)V
      official <init> Lyi;<init>(Ljava/lang/String;Ljava/util/Optional;)V
  • Method Details

    • readSelector

      @Nullable private static @Nullable EntitySelector readSelector(String pattern)
      Mappings:
      Namespace Name Mixin selector
      named readSelector Lnet/minecraft/text/SelectorTextContent;readSelector(Ljava/lang/String;)Lnet/minecraft/command/EntitySelector;
      intermediary method_43486 Lnet/minecraft/class_2579;method_43486(Ljava/lang/String;)Lnet/minecraft/class_2300;
      official a Lyi;a(Ljava/lang/String;)Lhi;
    • 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 Lxa;a()Lxa$a;
    • getPattern

      public String getPattern()
      Mappings:
      Namespace Name Mixin selector
      named getPattern Lnet/minecraft/text/SelectorTextContent;getPattern()Ljava/lang/String;
      intermediary method_10932 Lnet/minecraft/class_2579;method_10932()Ljava/lang/String;
      official b Lyi;b()Ljava/lang/String;
    • getSelector

      @Nullable public @Nullable EntitySelector getSelector()
      Mappings:
      Namespace Name Mixin selector
      named getSelector Lnet/minecraft/text/SelectorTextContent;getSelector()Lnet/minecraft/command/EntitySelector;
      intermediary method_36138 Lnet/minecraft/class_2579;method_36138()Lnet/minecraft/class_2300;
      official c Lyi;c()Lhi;
    • getSeparator

      public Optional<Text> getSeparator()
      Mappings:
      Namespace Name Mixin selector
      named getSeparator Lnet/minecraft/text/SelectorTextContent;getSeparator()Ljava/util/Optional;
      intermediary method_36339 Lnet/minecraft/class_2579;method_36339()Ljava/util/Optional;
      official d Lyi;d()Ljava/util/Optional;
    • 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 Lxa;a(Let;Lbsr;I)Lxn;
    • visit

      public <T> Optional<T> visit(StringVisitable.StyledVisitor<T> visitor, Style style)
      Visits this content. Returns a value if the visitor terminates amid the visit, or Optional.empty() if it proceeds.
      Specified by:
      visit in 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 Lxa;a(Lxe$b;Lxw;)Ljava/util/Optional;
    • visit

      public <T> Optional<T> visit(StringVisitable.Visitor<T> visitor)
      Visits this content. Returns a value if the visitor terminates amid the visit, or Optional.empty() if it proceeds.
      Specified by:
      visit in 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 Lxa;a(Lxe$a;)Ljava/util/Optional;
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/text/SelectorTextContent;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_2579;equals(Ljava/lang/Object;)Z
      official equals Lyi;equals(Ljava/lang/Object;)Z
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object