MC样式

导入相关包

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.MCStyle;

Constructor #构造函数

No Description Provided

new MCStyle() as MCStyle
new MCStyle();

方法

equals #等于

Return Type: boolean

MCStyle.equals(other as Object) as boolean
参数类型描述
otherObjectNo Description Provided

getBold

Return Type: boolean

MCStyle.getBold() as boolean
myMCStyle.getBold();

getFontId

Return Type: MCResourceLocation

MCStyle.getFontId() as MCResourceLocation
myMCStyle.getFontId();

获取插入

Return Type: string

MCStyle.getInsertion() as string
myMCStyle.getInsertion();

getItalic

Return Type: boolean

MCStyle.getItalic() as boolean
myMCStyle.getItalic();

getObfuscated

Return Type: boolean

MCStyle.getObfuscated() as boolean
myMCStyle.getObfuscated();

getStrikefe

Return Type: boolean

MCStyle.getStrikethrough() as boolean
myMCStyle.getStrikethrough();

获取下划线

Return Type: boolean

MCStyle.getUnderlined() as boolean
myMCStyle.getUnderlined();

hashCode

Return Type: int

MCStyle.hashCode() as int
myMCStyle.hashCode();

isEmpty

Whether or not this style is empty (inherits everything from the parent).

Return Type: boolean

MCStyle.isEmpty() as boolean
myMCStyle.isEmpty();

合并样式

Return Type: MCStyle

MCStyle.mergeStyle(style as MCStyle) as MCStyle
参数类型描述
样式MC样式No Description Provided

设置粗体

Return Type: MCStyle

MCStyle.setBold(boldIn as Boolean) as MCStyle
参数类型描述
boldInBooleanNo Description Provided

设置颜色

Return Type: MCStyle

MCStyle.setColor(colour as int) as MCStyle
参数类型描述
colourintNo Description Provided

Return Type: MCStyle

MCStyle.setColor(formatting as TextFormatting) as MCStyle
参数类型描述
格式化TextFormattingNo Description Provided

setFontId

Return Type: MCStyle

MCStyle.setFontId(location as MCResourceLocation) as MCStyle
参数类型描述
位置MCResourceLocationNo Description Provided

设置格式

Return Type: MCStyle

MCStyle.setFormatting(formatting as TextFormatting) as MCStyle
参数类型描述
格式化TextFormattingNo Description Provided

设置插入

Set a text to be inserted into Chat when the component is shift-clicked

Return Type: MCStyle

MCStyle.setInsertion(insertion as string) as MCStyle
参数类型描述
插入stringNo Description Provided

setItalic

Return Type: MCStyle

MCStyle.setItalic(italic as Boolean) as MCStyle
参数类型描述
italicBooleanNo Description Provided

setObfused

Return Type: MCStyle

MCStyle.setObfuscated(obfuscated as Boolean) as MCStyle
参数类型描述
obfuscatedBooleanNo Description Provided

设置删除线

Return Type: MCStyle

MCStyle.setStrikethrough(strikethrough as Boolean) as MCStyle
参数类型描述
strikethroughBooleanNo Description Provided

下划线

Return Type: MCStyle

MCStyle.setUnderlined(underlined as Boolean) as MCStyle
参数类型描述
下划线BooleanNo Description Provided

toString

Return Type: string

MCStyle.toString() as string
myMCStyle.toString();