Interface Component
- All Superinterfaces:
FormattedText, com.mojang.brigadier.Message
- All Known Implementing Classes:
MutableComponent
-
Nested Class Summary
Nested classes/interfaces inherited from interface FormattedText
FormattedText.ContentConsumer<T>, FormattedText.StyledContentConsumer<T> -
Field Summary
Fields inherited from interface FormattedText
EMPTY, STOP_ITERATION -
Method Summary
Modifier and TypeMethodDescriptiondefault booleandefault MutableComponentcopy()static MutableComponentempty()default Stringdefault StringgetString(int limit) Get the plain text of this FormattedText, without any styling or formatting codes, limited tomaxLengthcharacters.getStyle()static MutableComponentstatic MutableComponentstatic MutableComponentnbt(String nbtPath, boolean interpreting, Optional<Component> separator, DataSource dataSource) static ComponentnullToEmpty(@Nullable String text) static MutableComponentobject(ObjectInfo info) default MutableComponentstatic MutableComponentstatic MutableComponentscore(SelectorPattern pattern, String objective) static MutableComponentselector(SelectorPattern pattern, Optional<Component> separator) toFlatList(Style rootStyle) static MutableComponenttranslatable(String key) static MutableComponenttranslatable(String key, Object... args) static MutableComponenttranslatableEscape(String key, Object... args) static MutableComponenttranslatableWithFallback(String key, @Nullable String fallback) static MutableComponenttranslatableWithFallback(String key, @Nullable String fallback, Object... args) static ComponenttranslationArg(com.mojang.brigadier.Message message) static ComponenttranslationArg(URI uri) static ComponenttranslationArg(Date date) static ComponenttranslationArg(UUID uuid) static Componentstatic ComponenttranslationArg(ChunkPos chunkPos) default @Nullable Stringdefault <T> Optional<T> visit(FormattedText.ContentConsumer<T> output) default <T> Optional<T> visit(FormattedText.StyledContentConsumer<T> output, Style parentStyle)
-
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 nbtPath, boolean interpreting, Optional<Component> separator, DataSource dataSource) -
score
-
score
-
selector
-
object
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-