Class TranslatableTextContent

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

public class TranslatableTextContent extends Object implements TextContent
Mappings:
Namespace Name
official sj
intermediary net/minecraft/class_2588
named net/minecraft/text/TranslatableTextContent
  • Field Details

    • EMPTY_ARGUMENTS

      private static final Object[] EMPTY_ARGUMENTS
      Mappings:
      Namespace Name Mixin selector
      official b Lsj;b:[Ljava/lang/Object;
      intermediary field_24367 Lnet/minecraft/class_2588;field_24367:[Ljava/lang/Object;
      named EMPTY_ARGUMENTS Lnet/minecraft/text/TranslatableTextContent;EMPTY_ARGUMENTS:[Ljava/lang/Object;
    • LITERAL_PERCENT_SIGN

      private static final StringVisitable LITERAL_PERCENT_SIGN
      Mappings:
      Namespace Name Mixin selector
      official c Lsj;c:Lrp;
      intermediary field_24368 Lnet/minecraft/class_2588;field_24368:Lnet/minecraft/class_5348;
      named LITERAL_PERCENT_SIGN Lnet/minecraft/text/TranslatableTextContent;LITERAL_PERCENT_SIGN:Lnet/minecraft/text/StringVisitable;
    • NULL_ARGUMENT

      private static final StringVisitable NULL_ARGUMENT
      Mappings:
      Namespace Name Mixin selector
      official d Lsj;d:Lrp;
      intermediary field_24369 Lnet/minecraft/class_2588;field_24369:Lnet/minecraft/class_5348;
      named NULL_ARGUMENT Lnet/minecraft/text/TranslatableTextContent;NULL_ARGUMENT:Lnet/minecraft/text/StringVisitable;
    • ARG_FORMAT

      private static final Pattern ARG_FORMAT
      Mappings:
      Namespace Name Mixin selector
      official i Lsj;i:Ljava/util/regex/Pattern;
      intermediary field_11872 Lnet/minecraft/class_2588;field_11872:Ljava/util/regex/Pattern;
      named ARG_FORMAT Lnet/minecraft/text/TranslatableTextContent;ARG_FORMAT:Ljava/util/regex/Pattern;
    • key

      private final String key
      Mappings:
      Namespace Name Mixin selector
      official e Lsj;e:Ljava/lang/String;
      intermediary field_11876 Lnet/minecraft/class_2588;field_11876:Ljava/lang/String;
      named key Lnet/minecraft/text/TranslatableTextContent;key:Ljava/lang/String;
    • args

      private final Object[] args
      Mappings:
      Namespace Name Mixin selector
      official f Lsj;f:[Ljava/lang/Object;
      intermediary field_11875 Lnet/minecraft/class_2588;field_11875:[Ljava/lang/Object;
      named args Lnet/minecraft/text/TranslatableTextContent;args:[Ljava/lang/Object;
    • languageCache

      @Nullable private @Nullable Language languageCache
      Mappings:
      Namespace Name Mixin selector
      official g Lsj;g:Lpe;
      intermediary field_25317 Lnet/minecraft/class_2588;field_25317:Lnet/minecraft/class_2477;
      named languageCache Lnet/minecraft/text/TranslatableTextContent;languageCache:Lnet/minecraft/util/Language;
    • translations

      private List<StringVisitable> translations
      Mappings:
      Namespace Name Mixin selector
      official h Lsj;h:Ljava/util/List;
      intermediary field_11877 Lnet/minecraft/class_2588;field_11877:Ljava/util/List;
      named translations Lnet/minecraft/text/TranslatableTextContent;translations:Ljava/util/List;
  • Constructor Details

    • TranslatableTextContent

      public TranslatableTextContent(String key)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lsj;<init>(Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_2588;<init>(Ljava/lang/String;)V
      named <init> Lnet/minecraft/text/TranslatableTextContent;<init>(Ljava/lang/String;)V
    • TranslatableTextContent

      public TranslatableTextContent(String key, Object[] args)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lsj;<init>(Ljava/lang/String;[Ljava/lang/Object;)V
      intermediary <init> Lnet/minecraft/class_2588;<init>(Ljava/lang/String;[Ljava/lang/Object;)V
      named <init> Lnet/minecraft/text/TranslatableTextContent;<init>(Ljava/lang/String;[Ljava/lang/Object;)V
  • Method Details

    • updateTranslations

      private void updateTranslations()
      Mappings:
      Namespace Name Mixin selector
      official c Lsj;c()V
      intermediary method_11025 Lnet/minecraft/class_2588;method_11025()V
      named updateTranslations Lnet/minecraft/text/TranslatableTextContent;updateTranslations()V
    • forEachPart

      private void forEachPart(String translation, Consumer<StringVisitable> partsConsumer)
      Mappings:
      Namespace Name Mixin selector
      official a Lsj;a(Ljava/lang/String;Ljava/util/function/Consumer;)V
      intermediary method_11024 Lnet/minecraft/class_2588;method_11024(Ljava/lang/String;Ljava/util/function/Consumer;)V
      named forEachPart Lnet/minecraft/text/TranslatableTextContent;forEachPart(Ljava/lang/String;Ljava/util/function/Consumer;)V
    • getArg

      private StringVisitable getArg(int index)
      Mappings:
      Namespace Name Mixin selector
      official a Lsj;a(I)Lrp;
      intermediary method_29434 Lnet/minecraft/class_2588;method_29434(I)Lnet/minecraft/class_5348;
      named getArg Lnet/minecraft/text/TranslatableTextContent;getArg(I)Lnet/minecraft/text/StringVisitable;
    • 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
      official a Lrn;a(Lrp$b;Lrv;)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;
      named visit Lnet/minecraft/text/TextContent;visit(Lnet/minecraft/text/StringVisitable$StyledVisitor;Lnet/minecraft/text/Style;)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
      official a Lrn;a(Lrp$a;)Ljava/util/Optional;
      intermediary method_27659 Lnet/minecraft/class_7417;method_27659(Lnet/minecraft/class_5348$class_5245;)Ljava/util/Optional;
      named visit Lnet/minecraft/text/TextContent;visit(Lnet/minecraft/text/StringVisitable$Visitor;)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
      official a Lrn;a(Ldr;Lbaq;I)Lrt;
      intermediary method_10890 Lnet/minecraft/class_7417;method_10890(Lnet/minecraft/class_2168;Lnet/minecraft/class_1297;I)Lnet/minecraft/class_5250;
      named parse Lnet/minecraft/text/TextContent;parse(Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/entity/Entity;I)Lnet/minecraft/text/MutableText;
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object
    • getKey

      public String getKey()
      Mappings:
      Namespace Name Mixin selector
      official a Lsj;a()Ljava/lang/String;
      intermediary method_11022 Lnet/minecraft/class_2588;method_11022()Ljava/lang/String;
      named getKey Lnet/minecraft/text/TranslatableTextContent;getKey()Ljava/lang/String;
    • getArgs

      public Object[] getArgs()
      Mappings:
      Namespace Name Mixin selector
      official b Lsj;b()[Ljava/lang/Object;
      intermediary method_11023 Lnet/minecraft/class_2588;method_11023()[Ljava/lang/Object;
      named getArgs Lnet/minecraft/text/TranslatableTextContent;getArgs()[Ljava/lang/Object;