Package net.minecraft.text
Class TranslatableTextContent
java.lang.Object
net.minecraft.text.TranslatableTextContent
- All Implemented Interfaces:
TextContent
- Mappings:
Namespace Name official uw
intermediary net/minecraft/class_2588
named net/minecraft/text/TranslatableTextContent
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.text.TextContent
TextContent.class_8823<T extends TextContent>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Pattern
private final Object[]
static final Object[]
private final @Nullable String
static final com.mojang.serialization.MapCodec<TranslatableTextContent>
static final TextContent.class_8823<TranslatableTextContent>
private static final com.mojang.serialization.Codec<Object>
private static final com.mojang.serialization.Codec<Object>
private final String
private @Nullable Language
private static final StringVisitable
private static final StringVisitable
private List<StringVisitable>
-
Constructor Summary
ConstructorsConstructorDescriptionTranslatableTextContent
(String key, @Nullable String fallback, Object[] args) -
Method Summary
Modifier and TypeMethodDescriptionboolean
private void
forEachPart
(String translation, Consumer<StringVisitable> partsConsumer) private StringVisitable
getArg
(int index) Object[]
getArgs()
@Nullable String
getKey()
int
hashCode()
static boolean
method_54238
(@Nullable Object object) private static TranslatableTextContent
private static Object[]
method_54241
(Optional<List<Object>> optional) method_54244
(Object[] object) private static com.mojang.serialization.DataResult<Object>
method_54245
(@Nullable Object object) parse
(@Nullable ServerCommandSource source, @Nullable Entity sender, int depth) Parses this content into a basic mutable text without custom style or siblings.toString()
private void
<T> Optional<T>
visit
(StringVisitable.StyledVisitor<T> visitor, Style style) Visits this content.<T> Optional<T>
visit
(StringVisitable.Visitor<T> visitor) Visits this content.
-
Field Details
-
EMPTY_ARGUMENTS
- Mappings:
Namespace Name Mixin selector official a
Luw;a:[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;
-
field_46635
- Mappings:
Namespace Name Mixin selector official d
Luw;d:Lcom/mojang/serialization/Codec;
intermediary field_46635
Lnet/minecraft/class_2588;field_46635:Lcom/mojang/serialization/Codec;
named field_46635
Lnet/minecraft/text/TranslatableTextContent;field_46635:Lcom/mojang/serialization/Codec;
-
field_46636
- Mappings:
Namespace Name Mixin selector official e
Luw;e:Lcom/mojang/serialization/Codec;
intermediary field_46636
Lnet/minecraft/class_2588;field_46636:Lcom/mojang/serialization/Codec;
named field_46636
Lnet/minecraft/text/TranslatableTextContent;field_46636:Lcom/mojang/serialization/Codec;
-
field_46633
- Mappings:
Namespace Name Mixin selector official b
Luw;b:Lcom/mojang/serialization/MapCodec;
intermediary field_46633
Lnet/minecraft/class_2588;field_46633:Lcom/mojang/serialization/MapCodec;
named field_46633
Lnet/minecraft/text/TranslatableTextContent;field_46633:Lcom/mojang/serialization/MapCodec;
-
field_46634
- Mappings:
Namespace Name Mixin selector official c
Luw;c:Ltm$a;
intermediary field_46634
Lnet/minecraft/class_2588;field_46634:Lnet/minecraft/class_7417$class_8823;
named field_46634
Lnet/minecraft/text/TranslatableTextContent;field_46634:Lnet/minecraft/text/TextContent$class_8823;
-
LITERAL_PERCENT_SIGN
- Mappings:
Namespace Name Mixin selector official f
Luw;f:Ltq;
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
- Mappings:
Namespace Name Mixin selector official g
Luw;g:Ltq;
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
- Mappings:
Namespace Name Mixin selector official m
Luw;m: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
- Mappings:
Namespace Name Mixin selector official h
Luw;h: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;
-
fallback
- Mappings:
Namespace Name Mixin selector official i
Luw;i:Ljava/lang/String;
intermediary field_41875
Lnet/minecraft/class_2588;field_41875:Ljava/lang/String;
named fallback
Lnet/minecraft/text/TranslatableTextContent;fallback:Ljava/lang/String;
-
args
- Mappings:
Namespace Name Mixin selector official j
Luw;j:[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
- Mappings:
Namespace Name Mixin selector official k
Luw;k:Lqr;
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
- Mappings:
Namespace Name Mixin selector official l
Luw;l: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
- Mappings:
Namespace Name Mixin selector official <init>
Luw;<init>(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
intermediary <init>
Lnet/minecraft/class_2588;<init>(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
named <init>
Lnet/minecraft/text/TranslatableTextContent;<init>(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
-
-
Method Details
-
method_54245
private static com.mojang.serialization.DataResult<Object> method_54245(@Nullable @Nullable Object object) - Mappings:
Namespace Name Mixin selector official b
Luw;b(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
intermediary method_54245
Lnet/minecraft/class_2588;method_54245(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
named method_54245
Lnet/minecraft/text/TranslatableTextContent;method_54245(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
-
method_54238
- Mappings:
Namespace Name Mixin selector official a
Luw;a(Ljava/lang/Object;)Z
intermediary method_54238
Lnet/minecraft/class_2588;method_54238(Ljava/lang/Object;)Z
named method_54238
Lnet/minecraft/text/TranslatableTextContent;method_54238(Ljava/lang/Object;)Z
-
method_54244
- Mappings:
Namespace Name Mixin selector official a
Luw;a([Ljava/lang/Object;)Ljava/util/Optional;
intermediary method_54244
Lnet/minecraft/class_2588;method_54244([Ljava/lang/Object;)Ljava/util/Optional;
named method_54244
Lnet/minecraft/text/TranslatableTextContent;method_54244([Ljava/lang/Object;)Ljava/util/Optional;
-
method_54241
- Mappings:
Namespace Name Mixin selector official a
Luw;a(Ljava/util/Optional;)[Ljava/lang/Object;
intermediary method_54241
Lnet/minecraft/class_2588;method_54241(Ljava/util/Optional;)[Ljava/lang/Object;
named method_54241
Lnet/minecraft/text/TranslatableTextContent;method_54241(Ljava/util/Optional;)[Ljava/lang/Object;
-
method_54239
private static TranslatableTextContent method_54239(String string, Optional<String> optional, Optional<List<Object>> optional2) - Mappings:
Namespace Name Mixin selector official a
Luw;a(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)Luw;
intermediary method_54239
Lnet/minecraft/class_2588;method_54239(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/class_2588;
named method_54239
Lnet/minecraft/text/TranslatableTextContent;method_54239(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/text/TranslatableTextContent;
-
method_54163
- Specified by:
method_54163
in interfaceTextContent
- Mappings:
Namespace Name Mixin selector official a
Ltm;a()Ltm$a;
intermediary method_54163
Lnet/minecraft/class_7417;method_54163()Lnet/minecraft/class_7417$class_8823;
named method_54163
Lnet/minecraft/text/TextContent;method_54163()Lnet/minecraft/text/TextContent$class_8823;
-
updateTranslations
private void updateTranslations()- Mappings:
Namespace Name Mixin selector official e
Luw;e()V
intermediary method_11025
Lnet/minecraft/class_2588;method_11025()V
named updateTranslations
Lnet/minecraft/text/TranslatableTextContent;updateTranslations()V
-
forEachPart
- Mappings:
Namespace Name Mixin selector official a
Luw;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
- Mappings:
Namespace Name Mixin selector official a
Luw;a(I)Ltq;
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
Visits this content. Returns a value if the visitor terminates amid the visit, orOptional.empty()
if it proceeds.- Specified by:
visit
in interfaceTextContent
- Returns:
Optional.empty()
if the visit finished, or a terminating result from thevisitor
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Ltm;a(Ltq$b;Lui;)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
Visits this content. Returns a value if the visitor terminates amid the visit, orOptional.empty()
if it proceeds.- Specified by:
visit
in interfaceTextContent
- Returns:
Optional.empty()
if the visit finished, or a terminating result from thevisitor
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Ltm;a(Ltq$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 interfaceTextContent
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
Namespace Name Mixin selector official a
Ltm;a(Ldt;Lbiw;I)Ltz;
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
-
hashCode
public int hashCode() -
toString
-
getKey
- Mappings:
Namespace Name Mixin selector official b
Luw;b()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;
-
getFallback
- Mappings:
Namespace Name Mixin selector official c
Luw;c()Ljava/lang/String;
intermediary method_48323
Lnet/minecraft/class_2588;method_48323()Ljava/lang/String;
named getFallback
Lnet/minecraft/text/TranslatableTextContent;getFallback()Ljava/lang/String;
-
getArgs
- Mappings:
Namespace Name Mixin selector official d
Luw;d()[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;
-