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

戻り値の型: crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.appendSibling(component as crafttweaker.api.util.text.MCTextComponent);
ParameterTypeDescription
コンポーネントcrafttweaker.api.util.text.MCTextComponentNo description provided

appendText

戻り値の型: crafttweaker.api.util.text.MCTextComponent

myMCTTextComponent.appendText(text as String);
ParameterTypeDescription
テキストStringNo description provided

copyRaw

戻り値の型: crafttweaker.api.util.text.MCTextComponent

myMCTTextComponent.copyRaw();

deepCopy

戻り値の型: crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.deepCopy();

getString

Return type: String

myMCTTextComponent.getString();

getStringTruncated

Return type: String

myMCTextComponent.getStringTruncated(maxLen)
ParameterTypeDescription
maxLenintNo description provided

getUnformattedComponentText

Return type: String

myMCTextComponent.getUnformattedComponentText();

setStyle

戻り値の型: crafttweaker.api.util.text.MCTextComponent

myMCTextComponent.setStyle(style as crafttweaker.api.util.text.MCStyle);
ParameterTypeDescription
スタイルcrafttweaker.api.util.text.MCStyleNo description provided

Properties

名称TypeHas GetterHas Setter
書式設定されたテキストStringtruefalse
兄弟要素List<crafttweaker.api.util.text.MCTextComponent>truefalse
unformattedComponentTextStringtruefalse

演算子

ADD

myMCTextComponent + component as crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
コンポーネントcrafttweaker.api.util.text.MCTextComponentNo description provided
### CAT
myMCTextComponent ~ component as crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
コンポーネントcrafttweaker.api.util.text.MCTextComponentNo description provided
### SHL
myMCTextComponent << component as crafttweaker.api.util.text.MCTextComponent
ParameterTypeDescription
コンポーネントcrafttweaker.api.util.text.MCTextComponentNo description provided

Casters

Result typeIs Implicit
Stringfalse