MCTextComponent

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 at the very top of the file.

import crafttweaker.api.util.text.MCTextComponent;

Methods

createStringTextComponent

Return Type: MCTextComponent

MCTextComponent.createStringTextComponent(text as string) as MCTextComponent
ParameterTypeDescription
テキストstringNo Description Provided
createTranslationTextComponent

Return Type: MCTextComponent

MCTextComponent.createTranslationTextComponent(translationKey as string) as MCTextComponent
ParameterTypeDescription
translationKeystringNo Description Provided
createTranslationTextComponent

Return Type: MCTextComponent

MCTextComponent.createTranslationTextComponent(translationKey as string, args as Object[]) as MCTextComponent
ParameterTypeDescription
translationKeystringNo Description Provided
argsObject[]No Description Provided

Casters

Result typeIs Implicit
stringfalse

Methods

appendSibling

Return Type: MCTextComponent

MCTextComponent.appendSibling(component as MCTextComponent) as MCTextComponent
ParameterTypeDescription
componentMCTextComponentNo Description Provided
appendText

Return Type: MCTextComponent

MCTextComponent.appendText(text as string) as MCTextComponent
ParameterTypeDescription
テキストstringNo Description Provided
copyRaw

Return Type: MCTextComponent

MCTextComponent.copyRaw() as MCTextComponent
myMCTextComponent.copyRaw();
deepCopy

Return Type: MCTextComponent

MCTextComponent.deepCopy() as MCTextComponent
myMCTextComponent.deepCopy();
getString

Return Type: string

MCTextComponent.getString() as string
myMCTextComponent.getString();
getStringTruncated

Return Type: string

MCTextComponent.getStringTruncated(maxLen as int) as string
ParameterTypeDescription
maxLenintNo Description Provided
getUnformattedComponentText

Return Type: string

MCTextComponent.getUnformattedComponentText() as string
myMCTextComponent.getUnformattedComponentText();
setStyle

Return Type: MCTextComponent

MCTextComponent.setStyle(style as MCStyle) as MCTextComponent
ParameterTypeDescription
スタイルMCStyleNo Description Provided

演算子

ADD
myMCTextComponent + component as MCTextComponent
CAT
myMCTextComponent ~ component as MCTextComponent
SHL
myMCTextComponent << component as MCTextComponent

Properties

名称TypeHas GetterHas Setter
formattedTextstringtruefalse
siblingsstdlib.List<MCTextComponent>truefalse
unformattedComponentTextstringtruefalse