Package net.minecraft.network.chat
Interface Component
- All Superinterfaces:
FormattedText
,com.mojang.brigadier.Message
- All Known Implementing Classes:
MutableComponent
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
static class
Nested classes/interfaces inherited from interface net.minecraft.network.chat.FormattedText
FormattedText.ContentConsumer<T>, FormattedText.StyledContentConsumer<T>
-
Field Summary
Fields inherited from interface net.minecraft.network.chat.FormattedText
EMPTY, STOP_ITERATION
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
default MutableComponent
copy()
static MutableComponent
empty()
default String
default String
getString
(int pMaxLength) Get the plain text of this FormattedText, without any styling or formatting codes, limited tomaxLength
characters.getStyle()
static MutableComponent
static MutableComponent
static MutableComponent
nbt
(String pNbtPathPattern, boolean pInterpreting, Optional<Component> pSeparator, DataSource pDataSource) static Component
nullToEmpty
(String pText) default MutableComponent
static MutableComponent
static MutableComponent
toFlatList
(Style pStyle) static MutableComponent
translatable
(String pKey) static MutableComponent
translatable
(String pKey, Object... pArgs) static MutableComponent
translatableEscape
(String pKey, Object... pArgs) static MutableComponent
translatableWithFallback
(String pKey, String pFallback) static MutableComponent
translatableWithFallback
(String pKey, String pFallback, Object... pArgs) static Component
translationArg
(com.mojang.brigadier.Message p_304620_) static Component
translationArg
(URI pUri) static Component
translationArg
(Date pDate) static Component
translationArg
(UUID pUuid) static Component
translationArg
(ResourceLocation pLocation) static Component
translationArg
(ChunkPos pChunkPos) default String
default <T> Optional
<T> visit
(FormattedText.ContentConsumer<T> pAcceptor) default <T> Optional
<T> visit
(FormattedText.StyledContentConsumer<T> pAcceptor, Style pStyle)
-
Method Details
-
getStyle
Style getStyle() -
getContents
ComponentContents getContents() -
getString
- Specified by:
getString
in interfaceFormattedText
- Specified by:
getString
in interfacecom.mojang.brigadier.Message
-
getString
Get the plain text of this FormattedText, without any styling or formatting codes, limited tomaxLength
characters. -
getSiblings
-
tryCollapseToString
-
plainCopy
-
copy
-
getVisualOrderText
FormattedCharSequence getVisualOrderText() -
visit
- Specified by:
visit
in interfaceFormattedText
-
visit
- Specified by:
visit
in interfaceFormattedText
-
toFlatList
-
toFlatList
-
contains
-
nullToEmpty
-
literal
-
translatable
-
translatable
-
translatableEscape
-
translatableWithFallback
-
translatableWithFallback
static MutableComponent translatableWithFallback(String pKey, @Nullable String pFallback, Object... pArgs) -
empty
-
keybind
-
nbt
static MutableComponent nbt(String pNbtPathPattern, boolean pInterpreting, Optional<Component> pSeparator, DataSource pDataSource) -
score
-
selector
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-