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.item.component.Unbreakable;

Extending Record

Link to extending-record

Unbreakable extends Record. That means all methods available in Record are also available in Unbreakable

Name: of

Return Type: Unbreakable

ZenScript
Copy
Unbreakable.of(showInTooltip as boolean) as Unbreakable
ParameterType
Parameter
showInTooltip
Type
boolean

Name: withTooltip

Return Type: Unbreakable

ZenScript
Copy
Unbreakable.withTooltip(showInTooltip as boolean) as Unbreakable
ParameterType
Parameter
showInTooltip
Type
boolean
NameTypeHas GetterHas Setter
Name
showInTooltip
Type
boolean
Has Getter
true
Has Setter
false