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

Name: of

Return Type: CustomData

ZenScript
Copy
CustomData.of(tag as MapData) as CustomData
ParameterType
Parameter
tag
Type
MapData

Name: contains

Return Type: boolean

ZenScript
Copy
CustomData.contains(key as string) as boolean
ParameterType
Parameter
key
Type
string

Name: matchedBy

Return Type: boolean

ZenScript
Copy
CustomData.matchedBy(tag as MapData) as boolean
ParameterType
Parameter
tag
Type
MapData

Name: update

Return Type: CustomData

ZenScript
Copy
CustomData.update(updater as Consumer<MapData>) as CustomData
ParameterType
Parameter
updater
Type
Consumer<MapData>
NameTypeHas GetterHas Setter
Name
copyTag
Type
invalid
Has Getter
true
Has Setter
false
Name
isEmpty
Type
boolean
Has Getter
true
Has Setter
false
Name
size
Type
int
Has Getter
true
Has Setter
false