Package net.minecraft.util.text
Class TranslationTextComponent
- java.lang.Object
-
- net.minecraft.util.text.TextComponent
-
- net.minecraft.util.text.TranslationTextComponent
-
- All Implemented Interfaces:
com.mojang.brigadier.Message,IFormattableTextComponent,ITargetedTextComponent,ITextComponent,ITextProperties
public class TranslationTextComponent extends TextComponent implements ITargetedTextComponent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.minecraft.util.text.ITextComponent
ITextComponent.Serializer
-
Nested classes/interfaces inherited from interface net.minecraft.util.text.ITextProperties
ITextProperties.IStyledTextAcceptor<T>, ITextProperties.ITextAcceptor<T>
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object[]argsprivate java.util.List<ITextProperties>decomposedPartsprivate LanguageMapdecomposedWithprivate static java.util.regex.PatternFORMAT_PATTERNprivate java.lang.Stringkeyprivate static java.lang.Object[]NO_ARGSprivate static ITextPropertiesTEXT_NULLprivate static ITextPropertiesTEXT_PERCENT-
Fields inherited from class net.minecraft.util.text.TextComponent
siblings
-
Fields inherited from interface net.minecraft.util.text.ITextProperties
EMPTY, STOP_ITERATION
-
-
Constructor Summary
Constructors Constructor Description TranslationTextComponent(java.lang.String p_i232574_1_)TranslationTextComponent(java.lang.String p_i45160_1_, java.lang.Object... p_i45160_2_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddecompose()private voiddecomposeTemplate(java.lang.String p_240758_1_)booleanequals(java.lang.Object p_equals_1_)java.lang.Object[]getArgs()private ITextPropertiesgetArgument(int p_240757_1_)java.lang.StringgetKey()inthashCode()TranslationTextComponentplainCopy()IFormattableTextComponentresolve(CommandSource p_230535_1_, Entity p_230535_2_, int p_230535_3_)java.lang.StringtoString()<T> java.util.Optional<T>visitSelf(ITextProperties.IStyledTextAcceptor<T> p_230534_1_, Style p_230534_2_)<T> java.util.Optional<T>visitSelf(ITextProperties.ITextAcceptor<T> p_230533_1_)-
Methods inherited from class net.minecraft.util.text.TextComponent
append, copy, getContents, getSiblings, getStyle, getVisualOrderText, setStyle
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraft.util.text.IFormattableTextComponent
append, withStyle, withStyle, withStyle, withStyle
-
Methods inherited from interface net.minecraft.util.text.ITextComponent
getString, getString, visit, visit
-
-
-
-
Field Detail
-
NO_ARGS
private static final java.lang.Object[] NO_ARGS
-
TEXT_PERCENT
private static final ITextProperties TEXT_PERCENT
-
TEXT_NULL
private static final ITextProperties TEXT_NULL
-
key
private final java.lang.String key
-
args
private final java.lang.Object[] args
-
decomposedWith
@Nullable private LanguageMap decomposedWith
-
decomposedParts
private final java.util.List<ITextProperties> decomposedParts
-
FORMAT_PATTERN
private static final java.util.regex.Pattern FORMAT_PATTERN
-
-
Method Detail
-
decompose
private void decompose()
-
decomposeTemplate
private void decomposeTemplate(java.lang.String p_240758_1_)
-
getArgument
private ITextProperties getArgument(int p_240757_1_)
-
plainCopy
public TranslationTextComponent plainCopy()
- Specified by:
plainCopyin interfaceITextComponent- Specified by:
plainCopyin classTextComponent
-
visitSelf
public <T> java.util.Optional<T> visitSelf(ITextProperties.IStyledTextAcceptor<T> p_230534_1_, Style p_230534_2_)
- Specified by:
visitSelfin interfaceITextComponent
-
visitSelf
public <T> java.util.Optional<T> visitSelf(ITextProperties.ITextAcceptor<T> p_230533_1_)
- Specified by:
visitSelfin interfaceITextComponent
-
resolve
public IFormattableTextComponent resolve(@Nullable CommandSource p_230535_1_, @Nullable Entity p_230535_2_, int p_230535_3_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Specified by:
resolvein interfaceITargetedTextComponent- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
equals
public boolean equals(java.lang.Object p_equals_1_)
- Overrides:
equalsin classTextComponent
-
hashCode
public int hashCode()
- Overrides:
hashCodein classTextComponent
-
toString
public java.lang.String toString()
- Overrides:
toStringin classTextComponent
-
getKey
public java.lang.String getKey()
-
getArgs
public java.lang.Object[] getArgs()
-
-