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 maxLength) 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 nbtPathPattern, boolean interpreting, Optional<Component> separator, DataSource dataSource) static Component
nullToEmpty
(String text) default MutableComponent
static MutableComponent
static MutableComponent
toFlatList
(Style style) static MutableComponent
translatable
(String key) static MutableComponent
translatable
(String key, Object... args) static MutableComponent
translatableEscape
(String key, Object... args) static MutableComponent
translatableWithFallback
(String key, String fallback) static MutableComponent
translatableWithFallback
(String key, String fallback, Object... args) static Component
translationArg
(com.mojang.brigadier.Message message) static Component
translationArg
(URI uri) static Component
translationArg
(Date date) static Component
translationArg
(UUID uuid) static Component
translationArg
(ResourceLocation location) static Component
translationArg
(ChunkPos chunkPos) default String
default <T> Optional
<T> visit
(FormattedText.ContentConsumer<T> acceptor) default <T> Optional
<T> visit
(FormattedText.StyledContentConsumer<T> acceptor, Style p_style)
-
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 key, @Nullable String fallback, Object... args) -
empty
-
keybind
-
nbt
static MutableComponent nbt(String nbtPathPattern, boolean interpreting, Optional<Component> separator, DataSource dataSource) -
score
-
selector
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-