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 pNbtPathPattern, Entity pEntity, int pRecursionDepth) type()
default <T> Optional
<T> visit
(FormattedText.ContentConsumer<T> pContentConsumer) default <T> Optional
<T> visit
(FormattedText.StyledContentConsumer<T> pStyledContentConsumer, Style pStyle)
-
Method Details
-
visit
default <T> Optional<T> visit(FormattedText.StyledContentConsumer<T> pStyledContentConsumer, Style pStyle) -
visit
-
resolve
default MutableComponent resolve(@Nullable CommandSourceStack pNbtPathPattern, @Nullable Entity pEntity, int pRecursionDepth) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
type
ComponentContents.Type<?> type()
-