Package net.minecraft.text
Class TranslatableText
java.lang.Object
net.minecraft.text.BaseText
net.minecraft.text.TranslatableText
- All Implemented Interfaces:
com.mojang.brigadier.Message
,MutableText
,ParsableText
,StringVisitable
,Text
- Mappings:
Namespace Name official qn
intermediary net/minecraft/class_2588
named net/minecraft/text/TranslatableText
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.text.StringVisitable
StringVisitable.StyledVisitor<T>, StringVisitable.Visitor<T>
Nested classes/interfaces inherited from interface net.minecraft.text.Text
Text.Serializer
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Pattern
private final Object[]
private static final Object[]
private final String
private static final StringVisitable
private static final StringVisitable
private List<StringVisitable>
Fields inherited from interface net.minecraft.text.StringVisitable
EMPTY, TERMINATE_VISIT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Copies the text itself, excluding the styles or siblings.boolean
private void
forEachPart
(String translation, Consumer<StringVisitable> partsConsumer) private StringVisitable
getArg
(int index) Object[]
getArgs()
getKey()
int
hashCode()
parse
(@Nullable ServerCommandSource source, @Nullable Entity sender, int depth) toString()
private void
<T> Optional<T>
visitSelf
(StringVisitable.StyledVisitor<T> visitor, Style style) Visits the text itself.<T> Optional<T>
visitSelf
(StringVisitable.Visitor<T> visitor) Visits the text itself.Methods inherited from class net.minecraft.text.BaseText
append, asOrderedText, asString, getSiblings, getStyle, setStyle, shallowCopy
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.text.MutableText
append, fillStyle, formatted, formatted, styled
Methods inherited from interface net.minecraft.text.Text
asTruncatedString, getString, getWithStyle, visit, visit
-
Field Details
-
EMPTY_ARGUMENTS
- Mappings:
Namespace Name Mixin selector official d
Lqn;d:[Ljava/lang/Object;
intermediary field_24367
Lnet/minecraft/class_2588;field_24367:[Ljava/lang/Object;
named EMPTY_ARGUMENTS
Lnet/minecraft/text/TranslatableText;EMPTY_ARGUMENTS:[Ljava/lang/Object;
-
LITERAL_PERCENT_SIGN
- Mappings:
Namespace Name Mixin selector official e
Lqn;e:Lqc;
intermediary field_24368
Lnet/minecraft/class_2588;field_24368:Lnet/minecraft/class_5348;
named LITERAL_PERCENT_SIGN
Lnet/minecraft/text/TranslatableText;LITERAL_PERCENT_SIGN:Lnet/minecraft/text/StringVisitable;
-
NULL_ARGUMENT
- Mappings:
Namespace Name Mixin selector official f
Lqn;f:Lqc;
intermediary field_24369
Lnet/minecraft/class_2588;field_24369:Lnet/minecraft/class_5348;
named NULL_ARGUMENT
Lnet/minecraft/text/TranslatableText;NULL_ARGUMENT:Lnet/minecraft/text/StringVisitable;
-
ARG_FORMAT
- Mappings:
Namespace Name Mixin selector official k
Lqn;k:Ljava/util/regex/Pattern;
intermediary field_11872
Lnet/minecraft/class_2588;field_11872:Ljava/util/regex/Pattern;
named ARG_FORMAT
Lnet/minecraft/text/TranslatableText;ARG_FORMAT:Ljava/util/regex/Pattern;
-
key
- Mappings:
Namespace Name Mixin selector official g
Lqn;g:Ljava/lang/String;
intermediary field_11876
Lnet/minecraft/class_2588;field_11876:Ljava/lang/String;
named key
Lnet/minecraft/text/TranslatableText;key:Ljava/lang/String;
-
args
- Mappings:
Namespace Name Mixin selector official h
Lqn;h:[Ljava/lang/Object;
intermediary field_11875
Lnet/minecraft/class_2588;field_11875:[Ljava/lang/Object;
named args
Lnet/minecraft/text/TranslatableText;args:[Ljava/lang/Object;
-
languageCache
- Mappings:
Namespace Name Mixin selector official i
Lqn;i:Lnx;
intermediary field_25317
Lnet/minecraft/class_2588;field_25317:Lnet/minecraft/class_2477;
named languageCache
Lnet/minecraft/text/TranslatableText;languageCache:Lnet/minecraft/util/Language;
-
translations
- Mappings:
Namespace Name Mixin selector official j
Lqn;j:Ljava/util/List;
intermediary field_11877
Lnet/minecraft/class_2588;field_11877:Ljava/util/List;
named translations
Lnet/minecraft/text/TranslatableText;translations:Ljava/util/List;
-
-
Constructor Details
-
TranslatableText
- Mappings:
Namespace Name Mixin selector official <init>
Lqn;<init>(Ljava/lang/String;)V
intermediary <init>
Lnet/minecraft/class_2588;<init>(Ljava/lang/String;)V
named <init>
Lnet/minecraft/text/TranslatableText;<init>(Ljava/lang/String;)V
-
TranslatableText
- Mappings:
Namespace Name Mixin selector official <init>
Lqn;<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/TranslatableText;<init>(Ljava/lang/String;[Ljava/lang/Object;)V
-
-
Method Details
-
updateTranslations
private void updateTranslations()- Mappings:
Namespace Name Mixin selector official k
Lqn;k()V
intermediary method_11025
Lnet/minecraft/class_2588;method_11025()V
named updateTranslations
Lnet/minecraft/text/TranslatableText;updateTranslations()V
-
forEachPart
- Mappings:
Namespace Name Mixin selector official a
Lqn;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/TranslatableText;forEachPart(Ljava/lang/String;Ljava/util/function/Consumer;)V
-
getArg
- Mappings:
Namespace Name Mixin selector official b
Lqn;b(I)Lqc;
intermediary method_29434
Lnet/minecraft/class_2588;method_29434(I)Lnet/minecraft/class_5348;
named getArg
Lnet/minecraft/text/TranslatableText;getArg(I)Lnet/minecraft/text/StringVisitable;
-
copy
Description copied from interface:Text
Copies the text itself, excluding the styles or siblings.- Specified by:
copy
in interfaceText
- Specified by:
copy
in classBaseText
- Mappings:
Namespace Name Mixin selector official h
Lqn;h()Lqn;
intermediary method_11020
Lnet/minecraft/class_2588;method_11020()Lnet/minecraft/class_2588;
named copy
Lnet/minecraft/text/TranslatableText;copy()Lnet/minecraft/text/TranslatableText;
-
visitSelf
Visits the text itself.- Specified by:
visitSelf
in interfaceText
- Parameters:
visitor
- the visitorstyle
- the current style- Returns:
- the visitor's return value
- See Also:
- Mappings:
Namespace Name Mixin selector official b
Lpz;b(Lqc$b;Lqj;)Ljava/util/Optional;
intermediary method_27660
Lnet/minecraft/class_2561;method_27660(Lnet/minecraft/class_5348$class_5246;Lnet/minecraft/class_2583;)Ljava/util/Optional;
named visitSelf
Lnet/minecraft/text/Text;visitSelf(Lnet/minecraft/text/StringVisitable$StyledVisitor;Lnet/minecraft/text/Style;)Ljava/util/Optional;
-
visitSelf
Visits the text itself.- Specified by:
visitSelf
in interfaceText
- Parameters:
visitor
- the visitor- Returns:
- the visitor's return value
- See Also:
- Mappings:
Namespace Name Mixin selector official b
Lpz;b(Lqc$a;)Ljava/util/Optional;
intermediary method_27659
Lnet/minecraft/class_2561;method_27659(Lnet/minecraft/class_5348$class_5245;)Ljava/util/Optional;
named visitSelf
Lnet/minecraft/text/Text;visitSelf(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 - Specified by:
parse
in interfaceParsableText
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
Namespace Name Mixin selector official a
Lqb;a(Ldm;Lawt;I)Lqf;
intermediary method_10890
Lnet/minecraft/class_2566;method_10890(Lnet/minecraft/class_2168;Lnet/minecraft/class_1297;I)Lnet/minecraft/class_5250;
named parse
Lnet/minecraft/text/ParsableText;parse(Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/entity/Entity;I)Lnet/minecraft/text/MutableText;
-
equals
-
hashCode
public int hashCode() -
toString
-
getKey
- Mappings:
Namespace Name Mixin selector official i
Lqn;i()Ljava/lang/String;
intermediary method_11022
Lnet/minecraft/class_2588;method_11022()Ljava/lang/String;
named getKey
Lnet/minecraft/text/TranslatableText;getKey()Ljava/lang/String;
-
getArgs
- Mappings:
Namespace Name Mixin selector official j
Lqn;j()[Ljava/lang/Object;
intermediary method_11023
Lnet/minecraft/class_2588;method_11023()[Ljava/lang/Object;
named getArgs
Lnet/minecraft/text/TranslatableText;getArgs()[Ljava/lang/Object;
-