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 classstatic classNested 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 booleandefault MutableComponentcopy()static MutableComponentempty()default Stringdefault StringgetString(int maxLength) Get the plain text of this FormattedText, without any styling or formatting codes, limited tomaxLengthcharacters.getStyle()static MutableComponentstatic MutableComponentstatic MutableComponentnbt(String nbtPathPattern, boolean interpreting, Optional<Component> separator, DataSource dataSource) static ComponentnullToEmpty(String text) default MutableComponentstatic MutableComponentstatic MutableComponenttoFlatList(Style style) static MutableComponenttranslatable(String key) static MutableComponenttranslatable(String key, Object... args) static MutableComponenttranslatableEscape(String key, Object... args) static MutableComponenttranslatableWithFallback(String key, String fallback) static MutableComponenttranslatableWithFallback(String key, String fallback, Object... args) static ComponenttranslationArg(com.mojang.brigadier.Message message) static ComponenttranslationArg(URI uri) static ComponenttranslationArg(Date date) static ComponenttranslationArg(UUID uuid) static ComponenttranslationArg(ResourceLocation location) static ComponenttranslationArg(ChunkPos chunkPos) default Stringdefault <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:
getStringin interfaceFormattedText- Specified by:
getStringin interfacecom.mojang.brigadier.Message
-
getString
Get the plain text of this FormattedText, without any styling or formatting codes, limited tomaxLengthcharacters. -
getSiblings
-
tryCollapseToString
-
plainCopy
-
copy
-
getVisualOrderText
FormattedCharSequence getVisualOrderText() -
visit
- Specified by:
visitin interfaceFormattedText
-
visit
- Specified by:
visitin 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
-