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[]
args
private java.util.List<ITextProperties>
decomposedParts
private LanguageMap
decomposedWith
private static java.util.regex.Pattern
FORMAT_PATTERN
private java.lang.String
key
private static java.lang.Object[]
NO_ARGS
private static ITextProperties
TEXT_NULL
private static ITextProperties
TEXT_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 void
decompose()
private void
decomposeTemplate(java.lang.String p_240758_1_)
boolean
equals(java.lang.Object p_equals_1_)
java.lang.Object[]
getArgs()
private ITextProperties
getArgument(int p_240757_1_)
java.lang.String
getKey()
int
hashCode()
TranslationTextComponent
plainCopy()
IFormattableTextComponent
resolve(CommandSource p_230535_1_, Entity p_230535_2_, int p_230535_3_)
java.lang.String
toString()
<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:
plainCopy
in interfaceITextComponent
- Specified by:
plainCopy
in classTextComponent
-
visitSelf
public <T> java.util.Optional<T> visitSelf(ITextProperties.IStyledTextAcceptor<T> p_230534_1_, Style p_230534_2_)
- Specified by:
visitSelf
in interfaceITextComponent
-
visitSelf
public <T> java.util.Optional<T> visitSelf(ITextProperties.ITextAcceptor<T> p_230533_1_)
- Specified by:
visitSelf
in 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:
resolve
in interfaceITargetedTextComponent
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
equals
public boolean equals(java.lang.Object p_equals_1_)
- Overrides:
equals
in classTextComponent
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classTextComponent
-
toString
public java.lang.String toString()
- Overrides:
toString
in classTextComponent
-
getKey
public java.lang.String getKey()
-
getArgs
public java.lang.Object[] getArgs()
-
-