public interface ITextComponent extends com.mojang.brigadier.Message, java.lang.Iterable<ITextComponent>
修飾子とタイプ | インタフェースと説明 |
---|---|
static class |
ITextComponent.Serializer |
修飾子とタイプ | メソッドと説明 |
---|---|
ITextComponent |
appendSibling(ITextComponent component)
Adds a new component to the end of the sibling list, setting that component's style's parent style to this
component's style.
|
default ITextComponent |
appendText(java.lang.String text)
Adds a new component to the end of the sibling list, with the specified text.
|
default ITextComponent |
applyTextStyle(java.util.function.Consumer<Style> styleConsumer) |
default ITextComponent |
applyTextStyle(TextFormatting color) |
default ITextComponent |
applyTextStyles(TextFormatting... colors) |
static ITextComponent |
copyWithoutSiblings(ITextComponent textComponent) |
default ITextComponent |
deepCopy() |
default java.util.stream.Stream<ITextComponent> |
func_212637_f() |
default java.lang.String |
getFormattedText()
Gets the text of this component and all sibling components, with formatting codes added for rendering.
|
java.util.List<ITextComponent> |
getSiblings()
Gets the sibling components of this one.
|
default java.lang.String |
getString() |
default java.lang.String |
getStringTruncated(int maxLen) |
Style |
getStyle()
Gets the style of this component.
|
java.lang.String |
getUnformattedComponentText()
Gets the raw content of this component (but not its sibling components), without any formatting codes.
|
default java.util.Iterator<ITextComponent> |
iterator() |
ITextComponent |
setStyle(Style style)
Sets the style of this component and updates the parent style of all of the sibling components.
|
ITextComponent |
shallowCopy()
Creates a copy of this component.
|
java.util.stream.Stream<ITextComponent> |
stream() |
ITextComponent setStyle(Style style)
Style getStyle()
setStyle(Style)
again after modifying it).
If this component's style is currently null
, it will be initialized to the default style, and the
parent style of all sibling components will be set to that style. (IE, changes to this style will also be
reflected in sibling components.)
This method never returns null
.default ITextComponent appendText(java.lang.String text)
appendSibling(ITextComponent)
with a new TextComponentString
.ITextComponent appendSibling(ITextComponent component)
java.lang.String getUnformattedComponentText()
TextComponentString
, but it's the translated text for a TextComponentTranslation
and it's the score value for a TextComponentScore
.default java.lang.String getString()
getString
インタフェース内 com.mojang.brigadier.Message
default java.lang.String getStringTruncated(int maxLen)
default java.lang.String getFormattedText()
java.util.List<ITextComponent> getSiblings()
java.util.stream.Stream<ITextComponent> stream()
default java.util.stream.Stream<ITextComponent> func_212637_f()
default java.util.Iterator<ITextComponent> iterator()
iterator
インタフェース内 java.lang.Iterable<ITextComponent>
ITextComponent shallowCopy()
default ITextComponent deepCopy()
default ITextComponent applyTextStyle(java.util.function.Consumer<Style> styleConsumer)
default ITextComponent applyTextStyles(TextFormatting... colors)
default ITextComponent applyTextStyle(TextFormatting color)
static ITextComponent copyWithoutSiblings(ITextComponent textComponent)