public abstract class ATextComponent extends java.lang.Object implements net.lenni0451.mcstructs.core.ICopyable<ATextComponent>
StringComponentTranslationComponentScoreComponentSelectorComponentKeybindComponentBlockNbtComponentEntityNbtComponentStorageNbtComponent| Constructor and Description |
|---|
ATextComponent() |
| Modifier and Type | Method and Description |
|---|---|
ATextComponent |
append(ATextComponent... components)
Append multiple components to this component.
|
ATextComponent |
append(ATextComponent component)
Append a component to this component.
|
ATextComponent |
append(java.lang.String s)
Append a string to this component.
|
java.lang.String |
asLegacyFormatString() |
abstract java.lang.String |
asSingleString() |
java.lang.String |
asUnformattedString() |
abstract ATextComponent |
copy() |
ATextComponent |
copyParentStyle()
Set the style of this component as the parent style for all siblings.
|
abstract boolean |
equals(java.lang.Object o) |
ATextComponent |
forEach(java.util.function.Consumer<ATextComponent> consumer)
Iterate over all components and their siblings.
|
java.util.List<ATextComponent> |
getSiblings() |
Style |
getStyle() |
abstract int |
hashCode() |
<C extends ATextComponent> |
putMetaCopy(C component)
Copy the style and siblings of this component to the given component.
|
ATextComponent |
setParentStyle(Style style)
Set the parent style of this component.
|
ATextComponent |
setStyle(Style style)
Set the style of this component.
|
abstract java.lang.String |
toString() |
public ATextComponent append(java.lang.String s)
s - The string to appendpublic ATextComponent append(ATextComponent component)
component - The component to appendpublic ATextComponent append(ATextComponent... components)
components - The components to appendpublic java.util.List<ATextComponent> getSiblings()
public ATextComponent forEach(java.util.function.Consumer<ATextComponent> consumer)
consumer - The consumer that will be called for every component@Nonnull public Style getStyle()
public ATextComponent setStyle(@Nonnull Style style)
style - The new stylepublic ATextComponent setParentStyle(@Nonnull Style style)
style - The new parent stylepublic ATextComponent copyParentStyle()
public <C extends ATextComponent> C putMetaCopy(C component)
C - The type of the componentcomponent - The component to copy topublic java.lang.String asUnformattedString()
public java.lang.String asLegacyFormatString()
public abstract java.lang.String asSingleString()
public abstract ATextComponent copy()
copy in interface net.lenni0451.mcstructs.core.ICopyable<ATextComponent>public abstract boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic abstract int hashCode()
hashCode in class java.lang.Objectpublic abstract java.lang.String toString()
toString in class java.lang.Object