Package net.minecraft.network.chat
Interface Component
- All Superinterfaces:
FormattedText,com.mojang.brigadier.Message
- All Known Implementing Classes:
MutableComponent
-
Nested Class Summary
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 booleandefault MutableComponentcopy()static MutableComponentempty()default Stringdefault StringgetString(int pMaxLength) Get the plain text of this FormattedText, without any styling or formatting codes, limited tomaxLengthcharacters.getStyle()static MutableComponentstatic MutableComponentstatic MutableComponentnbt(String pNbtPathPattern, boolean pInterpreting, Optional<Component> pSeperator, DataSource pDataSource) static ComponentnullToEmpty(String pText) static MutableComponentobject(ObjectInfo pContents) default MutableComponentstatic MutableComponentstatic MutableComponentscore(SelectorPattern pSelectorPattern, String pObjective) static MutableComponentselector(SelectorPattern pSelectorPattern, Optional<Component> pSeparator) toFlatList(Style pStyle) static MutableComponenttranslatable(String pKey) static MutableComponenttranslatable(String pKey, Object... pArgs) static MutableComponenttranslatableEscape(String pKey, Object... pArgs) static MutableComponenttranslatableWithFallback(String pKey, String pFallback) static MutableComponenttranslatableWithFallback(String pKey, String pFallback, Object... pArgs) static ComponenttranslationArg(com.mojang.brigadier.Message pMessage) static ComponenttranslationArg(URI pUri) static ComponenttranslationArg(Date pDate) static ComponenttranslationArg(UUID pUuid) static ComponenttranslationArg(ResourceLocation pLocation) static ComponenttranslationArg(ChunkPos pChunkPos) default Stringdefault <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:
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 pKey, @Nullable String pFallback, Object... pArgs) -
empty
-
keybind
-
nbt
static MutableComponent nbt(String pNbtPathPattern, boolean pInterpreting, Optional<Component> pSeperator, DataSource pDataSource) -
score
-
score
-
selector
-
object
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-
translationArg
-