MCTextComponent

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

Type de retour : crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.appendSibling(composant comme crafttweaker.api.util.text.MCTextComponent);
ParameterTypeDescription
composantcrafttweaker.api.util.text.MCTextComponentNo description provided

appendText

Type de retour : crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.appendText(text as String);
ParameterTypeDescription
texteStringNo description provided

copier/copier brute

Type de retour : crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.copyRaw();

Copier en profondeur

Type de retour : crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.deepCopy();

getString

Return type: String

myMCTextComponent.getString();

format@@0 getStringTuncated

Return type: String

myMCTextComponent.getStringTruncated(maxLen comme int);
ParameterTypeDescription
maxLenintNo description provided

getUnformattedComponentText

Return type: String

myMCTextComponent.getUnformattedComponentText();

setStyle

Type de retour : crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.setStyle(style comme crafttweaker.api.util.text.MCStyle);
ParameterTypeDescription
stylecrafttweaker.api.util.text.MCStyleNo description provided

Properties

NameTypeHas GetterHas Setter
texte formatéStringtruefalse
frères et soeursListe<crafttweaker.api.util.text.MCTextComponent>truefalse
unformattedComponentTextStringtruefalse

Operators

ADD

myMCTextComponent + composant en tant que crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
composantcrafttweaker.api.util.text.MCTextComponentNo description provided
### CAT
myMCTextComponent ~ composant en tant que crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
composantcrafttweaker.api.util.text.MCTextComponentNo description provided
### SHL
myMCTextComponent << composant en tant que crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
composantcrafttweaker.api.util.text.MCTextComponentNo description provided

Casters

Result typeIs Implicit
Stringfalse