public class TranslationTextComponent extends TextComponent implements ITargetedTextComponent
ITextComponent.Serializer
Modifier and Type | Field and Description |
---|---|
protected java.util.List<ITextComponent> |
children |
private static LanguageMap |
FALLBACK_LANGUAGE |
private java.lang.Object[] |
formatArgs |
private java.lang.String |
key |
private long |
lastTranslationUpdateTimeInMilliseconds |
private static LanguageMap |
LOCAL_LANGUAGE |
static java.util.regex.Pattern |
STRING_VARIABLE_PATTERN |
private java.lang.Object |
syncLock |
siblings
Constructor and Description |
---|
TranslationTextComponent(java.lang.String translationKey,
java.lang.Object... args) |
Modifier and Type | Method and Description |
---|---|
ITextComponent |
createNames(CommandSource p_197668_1_,
Entity p_197668_2_,
int p_197668_3_) |
(package private) void |
ensureInitialized() |
boolean |
equals(java.lang.Object p_equals_1_) |
java.lang.Object[] |
getFormatArgs() |
private ITextComponent |
getFormatArgumentAsComponent(int index) |
java.lang.String |
getKey() |
java.lang.String |
getUnformattedComponentText() |
int |
hashCode() |
protected void |
initializeFromFormat(java.lang.String format) |
ITextComponent |
setStyle(Style style) |
TranslationTextComponent |
shallowCopy() |
java.util.stream.Stream<ITextComponent> |
stream() |
java.lang.String |
toString() |
appendSibling, getSiblings, getStyle
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
appendText, applyTextStyle, applyTextStyle, applyTextStyles, copyWithoutSiblings, deepCopy, func_212637_f, getFormattedText, getString, getStringTruncated, iterator
private static final LanguageMap FALLBACK_LANGUAGE
private static final LanguageMap LOCAL_LANGUAGE
private final java.lang.String key
private final java.lang.Object[] formatArgs
private final java.lang.Object syncLock
private long lastTranslationUpdateTimeInMilliseconds
protected final java.util.List<ITextComponent> children
public static final java.util.regex.Pattern STRING_VARIABLE_PATTERN
public TranslationTextComponent(java.lang.String translationKey, java.lang.Object... args)
void ensureInitialized()
protected void initializeFromFormat(java.lang.String format)
private ITextComponent getFormatArgumentAsComponent(int index)
public ITextComponent setStyle(Style style)
setStyle
in interface ITextComponent
setStyle
in class TextComponent
public java.util.stream.Stream<ITextComponent> stream()
stream
in interface ITextComponent
stream
in class TextComponent
public java.lang.String getUnformattedComponentText()
getUnformattedComponentText
in interface ITextComponent
public TranslationTextComponent shallowCopy()
shallowCopy
in interface ITextComponent
public ITextComponent createNames(@Nullable CommandSource p_197668_1_, @Nullable Entity p_197668_2_, int p_197668_3_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
createNames
in interface ITargetedTextComponent
com.mojang.brigadier.exceptions.CommandSyntaxException
public boolean equals(java.lang.Object p_equals_1_)
equals
in class TextComponent
public int hashCode()
hashCode
in class TextComponent
public java.lang.String toString()
toString
in class TextComponent
public java.lang.String getKey()
public java.lang.Object[] getFormatArgs()