Komponent MCText

This class was added by a mod with mod-id crafttweaker. So you need to have this mod installed if you want to use this feature.

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.

crafttweaker.api.util.text.MCTextComponent

Methods

appendSibling

Typ zwrotu: crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.appendSibling(komponent jako crafttweaker.api.util.text.MCTextComponent);
ParameterTypeDescription
komponentcrafttweaker.api.util.text.MCTextComponentNo description provided

appendText

Typ zwrotu: crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.appendText(tekst jako ciąg);
ParameterTypeDescription
tekstStringNo description provided

Kopiuj surowy

Typ zwrotu: crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.copyRaw();

deepCopy

Typ zwrotu: crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.deepCopy();

getString

Return type: String

myMCTextComponent.getString();

getStringskrócony

Return type: String

myMCTextComponent.getStringTruncated(maxLen jako int);
ParameterTypeDescription
maksimumintNo description provided

getUnformattedComponentText

Return type: String

myMCTextComponent.getUnformattedComponentText();

setStyle

Typ zwrotu: crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.setStyle(styl jak crafttweaker.api.util.text.MCStyle);
ParameterTypeDescription
stylcraftaweaker.api.util.text.MCStyleNo description provided

Properties

NameTypeHas GetterHas Setter
sformatowanTekstStringtruefalse
rodzeństwoLista<crafttweaker.api.util.text.MCTextComponent>truefalse
unformattedComponentTextStringtruefalse

Operators

ADD

Komponent myMCTextComponent + jako komponent crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
komponentcrafttweaker.api.util.text.MCTextComponentNo description provided
### CAT
Komponent myMCText~ jako komponent crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
komponentcrafttweaker.api.util.text.MCTextComponentNo description provided
### SHL
Komponent myMCTextComponent << jako crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
komponentcrafttweaker.api.util.text.MCTextComponentNo description provided

Casters

Result typeIs Implicit
Stringfalse