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

Return type: crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.appendSibling(component as crafttweaker.api.util.text.MCTextComponent);
ParameterTypeDescription
componentcrafttweaker.api.util.text.MCTextComponentNo description provided

appendText

Return type: crafttweaker.api.util.text.MCTextComponent

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

copyRaw

Return type: crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.copyRaw();

deepCopy

Return type: crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.deepCopy();

getString

Return type: String

myMCTextComponent.getString();

getStringTruncated

Return type: String

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

getUnformattedComponentText

Return type: String

myMCTextComponent.getUnformattedComponentText();

setStyle

Return type: crafttweaker.api.util.text.MCTextComponent

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

Properties

이름TypeHas GetterHas Setter
formattedTextStringtruefalse
siblingsList<crafttweaker.api.util.text.MCTextComponent>truefalse
unformattedComponentTextStringtruefalse

연산자

ADD

myMCTextComponent + component as crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
componentcrafttweaker.api.util.text.MCTextComponentNo description provided
### CAT
myMCTextComponent ~ component as crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
componentcrafttweaker.api.util.text.MCTextComponentNo description provided
### SHL
myMCTextComponent << component as crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
componentcrafttweaker.api.util.text.MCTextComponentNo description provided

Casters

Result typeIs Implicit
Stringfalse