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

Extending Record

Link to extending-record

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

Name: of

Return Type: ItemLore

ZenScript
Copy
ItemLore.of(lines as stdlib.List<Component>) as ItemLore
ParameterType
Parameter
lines
Type
stdlib.List<Component>

Name: of

Return Type: ItemLore

ZenScript
Copy
ItemLore.of(lines as stdlib.List<Component>, styledLines as stdlib.List<Component>) as ItemLore
ParameterType
Parameter
lines
Type
stdlib.List<Component>
Parameter
styledLines
Type
stdlib.List<Component>

Name: withLineAdded

Return Type: ItemLore

ZenScript
Copy
ItemLore.withLineAdded(line as Component) as ItemLore
ParameterType
Parameter
line
Type
Component
NameTypeHas GetterHas Setter
Name
lines
Type
stdlib.List<Component>
Has Getter
true
Has Setter
false
Name
styledLines
Type
stdlib.List<Component>
Has Getter
true
Has Setter
false