Package net.minecraft.network.chat
Interface ComponentContents
- All Known Subinterfaces:
PlainTextContents
- All Known Implementing Classes:
InsertingContents
,KeybindContents
,NbtContents
,PlainTextContents.LiteralContents
,ScoreContents
,SelectorContents
,TranslatableContents
public interface ComponentContents
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final record
ComponentContents.Type<T extends ComponentContents>
-
Method Summary
Modifier and TypeMethodDescriptiondefault MutableComponent
resolve
(CommandSourceStack nbtPathPattern, Entity entity, int recursionDepth) type()
default <T> Optional
<T> visit
(FormattedText.ContentConsumer<T> contentConsumer) default <T> Optional
<T> visit
(FormattedText.StyledContentConsumer<T> styledContentConsumer, Style style)
-
Method Details
-
visit
default <T> Optional<T> visit(FormattedText.StyledContentConsumer<T> styledContentConsumer, Style style) -
visit
-
resolve
default MutableComponent resolve(@Nullable CommandSourceStack nbtPathPattern, @Nullable Entity entity, int recursionDepth) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
type
ComponentContents.Type<?> type()
-