Package net.minecraft.network.chat
Class MutableComponent
java.lang.Object
net.minecraft.network.chat.MutableComponent
- All Implemented Interfaces:
com.mojang.brigadier.Message,Component,FormattedText
A Component which can have its Style and siblings modified.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.chat.FormattedText
FormattedText.ContentConsumer<T>, FormattedText.StyledContentConsumer<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ComponentContentsprivate Languageprivate Styleprivate FormattedCharSequenceFields inherited from interface net.minecraft.network.chat.FormattedText
EMPTY, STOP_ITERATION -
Constructor Summary
ConstructorsConstructorDescriptionMutableComponent(ComponentContents pContents, List<Component> pSiblings, Style pStyle) -
Method Summary
Modifier and TypeMethodDescriptionAdd the given text to this component's siblings.Add the given component to this component's siblings.static MutableComponentcreate(ComponentContents pContents) booleangetStyle()inthashCode()Sets the style for this component and returns the component itself.toString()withColor(int pColor) withStyle(UnaryOperator<Style> pModifyFunc) withStyle(ChatFormatting pFormat) withStyle(ChatFormatting... pFormats) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.chat.Component
contains, copy, getString, getString, plainCopy, toFlatList, toFlatList, tryCollapseToString, visit, visit
-
Field Details
-
contents
-
siblings
-
style
-
visualOrderText
-
decomposedWith
-
-
Constructor Details
-
MutableComponent
MutableComponent(ComponentContents pContents, List<Component> pSiblings, Style pStyle)
-
-
Method Details
-
create
-
getContents
- Specified by:
getContentsin interfaceComponent
-
getSiblings
- Specified by:
getSiblingsin interfaceComponent
-
setStyle
Sets the style for this component and returns the component itself. -
getStyle
-
append
Add the given text to this component's siblings. Note: If this component turns the text bold, that will apply to all the siblings until a later sibling turns the text something else. -
append
Add the given component to this component's siblings. Note: If this component turns the text bold, that will apply to all the siblings until a later sibling turns the text something else. -
withStyle
-
withStyle
-
withStyle
-
withStyle
-
withColor
-
getVisualOrderText
- Specified by:
getVisualOrderTextin interfaceComponent
-
equals
-
hashCode
public int hashCode() -
toString
-