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