Package net.minecraft.util
Class ChatComponentStyle
- java.lang.Object
-
- net.minecraft.util.ChatComponentStyle
-
- All Implemented Interfaces:
java.lang.Iterable<IChatComponent>,IChatComponent
- Direct Known Subclasses:
ChatComponentScore,ChatComponentSelector,ChatComponentText,ChatComponentTranslation
public abstract class ChatComponentStyle extends java.lang.Object implements IChatComponent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.minecraft.util.IChatComponent
IChatComponent.Serializer
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<IChatComponent>siblings+ The later siblings of this component.
-
Constructor Summary
Constructors Constructor Description ChatComponentStyle()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IChatComponentappendSibling(IChatComponent component)+ Appends the given component to the end of this one.IChatComponentappendText(java.lang.String text)+ Appends the given text to the end of this component.static java.util.Iterator<IChatComponent>createDeepCopyIterator(java.lang.Iterable<IChatComponent> components)+ Creates an iterator that iterates over the given components, returning deep copies of each component in turn so that the properties of the returned objects will remain externally consistent after being returned.booleanequals(java.lang.Object object)ChatStylegetChatStyle()java.lang.StringgetFormattedText()+ Gets the text of this component, with formatting codes added for rendering.java.util.List<IChatComponent>getSiblings()+ Gets the sibling components of this one.java.lang.StringgetUnformattedText()+ Get the text of this component, and all child components, with all special formatting codes removed.inthashCode()java.util.Iterator<IChatComponent>iterator()IChatComponentsetChatStyle(ChatStyle style)java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraft.util.IChatComponent
createCopy, getUnformattedTextForChat
-
-
-
-
Field Detail
-
siblings
protected java.util.List<IChatComponent> siblings
+ The later siblings of this component. If this component turns the text bold, that will apply to all the siblings until a later sibling turns the text something else.
-
-
Method Detail
-
appendSibling
public IChatComponent appendSibling(IChatComponent component)
+ Appends the given component to the end of this one.- Specified by:
appendSiblingin interfaceIChatComponent
-
getSiblings
public java.util.List<IChatComponent> getSiblings()
+ Gets the sibling components of this one.- Specified by:
getSiblingsin interfaceIChatComponent
-
appendText
public IChatComponent appendText(java.lang.String text)
+ Appends the given text to the end of this component.- Specified by:
appendTextin interfaceIChatComponent
-
setChatStyle
public IChatComponent setChatStyle(ChatStyle style)
- Specified by:
setChatStylein interfaceIChatComponent
-
getChatStyle
public ChatStyle getChatStyle()
- Specified by:
getChatStylein interfaceIChatComponent
-
iterator
public java.util.Iterator<IChatComponent> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<IChatComponent>
-
getUnformattedText
public final java.lang.String getUnformattedText()
+ Get the text of this component, and all child components, with all special formatting codes removed.- Specified by:
getUnformattedTextin interfaceIChatComponent
-
getFormattedText
public final java.lang.String getFormattedText()
+ Gets the text of this component, with formatting codes added for rendering.- Specified by:
getFormattedTextin interfaceIChatComponent
-
createDeepCopyIterator
public static java.util.Iterator<IChatComponent> createDeepCopyIterator(java.lang.Iterable<IChatComponent> components)
+ Creates an iterator that iterates over the given components, returning deep copies of each component in turn so that the properties of the returned objects will remain externally consistent after being returned.
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-