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();

createStringTextComponent

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

crafttweaker.api.util.text.MCTextComponent.createStringTextComponent(text as String);
ParameterTypeDescription
textStringNo description provided

createTranslationTextComponent

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

crafttweaker.api.util.text.MCTextComponent.createTranslationTextComponent(translationKey as String);
ParameterTypeDescription
translationKeyStringNo description provided

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

crafttweaker.api.util.text.MCTextComponent.createTranslationTextComponent(translationKey as String, args as Object[]);
ParameterTypeDescription
translationKeyStringNo description provided
argsObject[]No description provided

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

NameTypeHas GetterHas Setter
formattedTextStringtruefalse
siblingsList<crafttweaker.api.util.text.MCTextComponent>truefalse
unformattedComponentTextStringtruefalse

Operators

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