public class TranslationTextComponent extends TextComponent implements ITargetedTextComponent
ITextComponent.Serializer
修飾子とタイプ | フィールドと説明 |
---|---|
protected java.util.List<ITextComponent> |
children
The discrete elements that make up this component.
|
static java.util.regex.Pattern |
STRING_VARIABLE_PATTERN |
siblings
コンストラクタと説明 |
---|
TranslationTextComponent(java.lang.String translationKey,
java.lang.Object... args) |
修飾子とタイプ | メソッドと説明 |
---|---|
ITextComponent |
createNames(CommandSource p_197668_1_,
Entity p_197668_2_,
int p_197668_3_) |
boolean |
equals(java.lang.Object p_equals_1_) |
java.lang.Object[] |
getFormatArgs()
Gets the object array that is used to translate the key.
|
java.lang.String |
getKey()
Gets the key used to translate this component.
|
java.lang.String |
getUnformattedComponentText()
Gets the raw content of this component (but not its sibling components), without any formatting codes.
|
int |
hashCode() |
protected void |
initializeFromFormat(java.lang.String format)
Initializes the content of this component, substituting in variables.
|
ITextComponent |
setStyle(Style style)
Sets the style of this component and updates the parent style of all of the sibling components.
|
TranslationTextComponent |
shallowCopy()
Creates a copy of this component.
|
java.util.stream.Stream<ITextComponent> |
stream() |
java.lang.String |
toString() |
appendSibling, getSiblings, getStyle
appendText, applyTextStyle, applyTextStyle, applyTextStyles, copyWithoutSiblings, deepCopy, func_212637_f, getFormattedText, getString, getStringTruncated, iterator
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)
protected void initializeFromFormat(java.lang.String format)
public ITextComponent setStyle(Style style)
setStyle
インタフェース内 ITextComponent
setStyle
クラス内 TextComponent
public java.util.stream.Stream<ITextComponent> stream()
stream
インタフェース内 ITextComponent
stream
クラス内 TextComponent
public java.lang.String getUnformattedComponentText()
TextComponentString
, but it's the translated text for a TextComponentTranslation
and it's the score value for a TextComponentScore
.getUnformattedComponentText
インタフェース内 ITextComponent
public TranslationTextComponent shallowCopy()
shallowCopy
インタフェース内 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
インタフェース内 ITargetedTextComponent
com.mojang.brigadier.exceptions.CommandSyntaxException
public boolean equals(java.lang.Object p_equals_1_)
equals
クラス内 TextComponent
public int hashCode()
hashCode
クラス内 TextComponent
public java.lang.String toString()
toString
クラス内 TextComponent
public java.lang.String getKey()
public java.lang.Object[] getFormatArgs()