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, getStyleclone, finalize, getClass, notify, notifyAll, wait, wait, waitappendText, applyTextStyle, applyTextStyle, applyTextStyles, copyWithoutSiblings, deepCopy, func_212637_f, getFormattedText, getString, getStringTruncated, iteratorprivate 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 ITextComponentsetStyle in class TextComponentpublic java.util.stream.Stream<ITextComponent> stream()
stream in interface ITextComponentstream in class TextComponentpublic java.lang.String getUnformattedComponentText()
getUnformattedComponentText in interface ITextComponentpublic TranslationTextComponent shallowCopy()
shallowCopy in interface ITextComponentpublic 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 ITargetedTextComponentcom.mojang.brigadier.exceptions.CommandSyntaxExceptionpublic boolean equals(java.lang.Object p_equals_1_)
equals in class TextComponentpublic int hashCode()
hashCode in class TextComponentpublic java.lang.String toString()
toString in class TextComponentpublic java.lang.String getKey()
public java.lang.Object[] getFormatArgs()