Class TranslatableContents
java.lang.Object
net.minecraft.network.chat.contents.TranslatableContents
- All Implemented Interfaces:
ComponentContents
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.chat.ComponentContents
ComponentContents.Type<T extends ComponentContents>
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec
<Object> private final Object[]
static final com.mojang.serialization.MapCodec
<TranslatableContents> private List
<FormattedText> private Language
private final String
private static final Pattern
private final String
static final Object[]
private static final com.mojang.serialization.Codec
<Object> private static final FormattedText
private static final FormattedText
static final ComponentContents.Type
<TranslatableContents> -
Constructor Summary
ConstructorDescriptionTranslatableContents
(String p_265775_, String p_265204_, Object[] p_265752_) -
Method Summary
Modifier and TypeMethodDescriptionadjustArgs
(Object[] p_304743_) private static Object[]
adjustArgs
(Optional<List<Object>> p_304744_) private static TranslatableContents
private void
private void
decomposeTemplate
(String p_237516_, Consumer<FormattedText> p_237517_) boolean
private static com.mojang.serialization.DataResult
<Object> filterAllowedArguments
(Object p_304727_) Object[]
getArgs()
private FormattedText
getArgument
(int p_237510_) getKey()
int
hashCode()
static boolean
isAllowedPrimitiveArgument
(Object p_304690_) resolve
(CommandSourceStack p_237512_, Entity p_237513_, int p_237514_) toString()
type()
<T> Optional
<T> visit
(FormattedText.ContentConsumer<T> p_237519_) <T> Optional
<T> visit
(FormattedText.StyledContentConsumer<T> p_237521_, Style p_237522_)
-
Field Details
-
NO_ARGS
-
PRIMITIVE_ARG_CODEC
-
ARG_CODEC
-
CODEC
-
TYPE
-
TEXT_PERCENT
-
TEXT_NULL
-
key
-
fallback
-
args
-
decomposedWith
-
decomposedParts
-
FORMAT_PATTERN
-
-
Constructor Details
-
TranslatableContents
-
-
Method Details
-
filterAllowedArguments
-
isAllowedPrimitiveArgument
-
adjustArgs
-
adjustArgs
-
create
-
type
- Specified by:
type
in interfaceComponentContents
-
decompose
private void decompose() -
decomposeTemplate
-
getArgument
-
visit
- Specified by:
visit
in interfaceComponentContents
-
visit
- Specified by:
visit
in interfaceComponentContents
-
resolve
public MutableComponent resolve(@Nullable CommandSourceStack p_237512_, @Nullable Entity p_237513_, int p_237514_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
resolve
in interfaceComponentContents
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
equals
-
hashCode
public int hashCode() -
toString
-
getKey
-
getFallback
-
getArgs
-