Interface Component
- All Superinterfaces:
FormattedText, 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) getStyle()static MutableComponentstatic MutableComponentstatic MutableComponentnbt(CompilableString<NbtPathArgument.NbtPath> nbtPath, boolean interpreting, boolean plain, Optional<Component> separator, DataSource dataSource) static ComponentnullToEmpty(@Nullable String text) static MutableComponentobject(ObjectInfo info) static MutableComponentobject(ObjectInfo info, Component fallback) default MutableComponentstatic MutableComponentstatic MutableComponentscore(CompilableString<EntitySelector> pattern, String objective) static MutableComponentselector(CompilableString<EntitySelector> 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(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 interfaceMessage
-
getString
-
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(CompilableString<NbtPathArgument.NbtPath> nbtPath, boolean interpreting, boolean plain, Optional<Component> separator, DataSource dataSource) -
score
-
score
-
selector
static MutableComponent selector(CompilableString<EntitySelector> pattern, Optional<Component> separator) -
object
-
object
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-