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 IChatComponent
appendSibling(IChatComponent component)
+ Appends the given component to the end of this one.IChatComponent
appendText(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.boolean
equals(java.lang.Object object)
ChatStyle
getChatStyle()
java.lang.String
getFormattedText()
+ 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.String
getUnformattedText()
+ Get the text of this component, and all child components, with all special formatting codes removed.int
hashCode()
java.util.Iterator<IChatComponent>
iterator()
IChatComponent
setChatStyle(ChatStyle style)
java.lang.String
toString()
-
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:
appendSibling
in interfaceIChatComponent
-
getSiblings
public java.util.List<IChatComponent> getSiblings()
+ Gets the sibling components of this one.- Specified by:
getSiblings
in interfaceIChatComponent
-
appendText
public IChatComponent appendText(java.lang.String text)
+ Appends the given text to the end of this component.- Specified by:
appendText
in interfaceIChatComponent
-
setChatStyle
public IChatComponent setChatStyle(ChatStyle style)
- Specified by:
setChatStyle
in interfaceIChatComponent
-
getChatStyle
public ChatStyle getChatStyle()
- Specified by:
getChatStyle
in interfaceIChatComponent
-
iterator
public java.util.Iterator<IChatComponent> iterator()
- Specified by:
iterator
in 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:
getUnformattedText
in interfaceIChatComponent
-
getFormattedText
public final java.lang.String getFormattedText()
+ Gets the text of this component, with formatting codes added for rendering.- Specified by:
getFormattedText
in 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-