Importing the class

Link to 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.

ZenScript
Copy
import crafttweaker.api.util.text.MCStyle;

No Description Provided

ZenScript
Copy
new MCStyle() as MCStyle
new MCStyle();

Name: equals

Return Type: boolean

ZenScript
Copy
MCStyle.equals(other as Object) as boolean
ParameterTypeDescription
Parameter
other
Type
Object
Description
No Description Provided

Name: getBold

Return Type: boolean

ZenScript
Copy
// MCStyle.getBold() as boolean

myMCStyle.getBold();

Name: getFontId

Return Type: MCResourceLocation

ZenScript
Copy
// MCStyle.getFontId() as MCResourceLocation

myMCStyle.getFontId();

Name: getInsertion

Return Type: string

ZenScript
Copy
// MCStyle.getInsertion() as string

myMCStyle.getInsertion();

Name: getItalic

Return Type: boolean

ZenScript
Copy
// MCStyle.getItalic() as boolean

myMCStyle.getItalic();

Name: getObfuscated

Return Type: boolean

ZenScript
Copy
// MCStyle.getObfuscated() as boolean

myMCStyle.getObfuscated();

Name: getStrikethrough

Return Type: boolean

ZenScript
Copy
// MCStyle.getStrikethrough() as boolean

myMCStyle.getStrikethrough();

Name: getUnderlined

Return Type: boolean

ZenScript
Copy
// MCStyle.getUnderlined() as boolean

myMCStyle.getUnderlined();

Name: hashCode

Return Type: int

ZenScript
Copy
// MCStyle.hashCode() as int

myMCStyle.hashCode();

Name: isEmpty

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

Return Type: boolean

ZenScript
Copy
// MCStyle.isEmpty() as boolean

myMCStyle.isEmpty();

Name: mergeStyle

Return Type: MCStyle

ZenScript
Copy
MCStyle.mergeStyle(style as MCStyle) as MCStyle
ParameterTypeDescription
Parameter
style
Type
MCStyle
Description
No Description Provided

Name: setBold

Return Type: MCStyle

ZenScript
Copy
MCStyle.setBold(boldIn as Boolean) as MCStyle
ParameterTypeDescription
Parameter
boldIn
Type
Boolean
Description
No Description Provided

Name: setColor

Return Type: MCStyle

ZenScript
Copy
MCStyle.setColor(colour as int) as MCStyle
ParameterTypeDescription
Parameter
colour
Type
int
Description
No Description Provided

Name: setColor

Return Type: MCStyle

ZenScript
Copy
MCStyle.setColor(formatting as TextFormatting) as MCStyle
ParameterTypeDescription
Parameter
mise en forme
Type
TextFormatting
Description
No Description Provided

Name: setFontId

Return Type: MCStyle

ZenScript
Copy
MCStyle.setFontId(location as MCResourceLocation) as MCStyle
ParameterTypeDescription
Parameter
Localisation
Type
format@@0 MCRessourceLocation
Description
No Description Provided

Name: setFormatting

Return Type: MCStyle

ZenScript
Copy
MCStyle.setFormatting(formatting as TextFormatting) as MCStyle
ParameterTypeDescription
Parameter
mise en forme
Type
TextFormatting
Description
No Description Provided

Name: setInsertion

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

Return Type: MCStyle

ZenScript
Copy
MCStyle.setInsertion(insertion as string) as MCStyle
ParameterTypeDescription
Parameter
insertion
Type
string
Description
No Description Provided

Name: setItalic

Return Type: MCStyle

ZenScript
Copy
MCStyle.setItalic(italic as Boolean) as MCStyle
ParameterTypeDescription
Parameter
italic
Type
Boolean
Description
No Description Provided

Name: setObfuscated

Return Type: MCStyle

ZenScript
Copy
MCStyle.setObfuscated(obfuscated as Boolean) as MCStyle
ParameterTypeDescription
Parameter
obfuscated
Type
Boolean
Description
No Description Provided

Name: setStrikethrough

Return Type: MCStyle

ZenScript
Copy
MCStyle.setStrikethrough(strikethrough as Boolean) as MCStyle
ParameterTypeDescription
Parameter
strikethrough
Type
Boolean
Description
No Description Provided

Name: setUnderlined

Return Type: MCStyle

ZenScript
Copy
MCStyle.setUnderlined(underlined as Boolean) as MCStyle
ParameterTypeDescription
Parameter
souligné
Type
Boolean
Description
No Description Provided

Name: toString

Return Type: string

ZenScript
Copy
// MCStyle.toString() as string

myMCStyle.toString();