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

Extending Record

Link to extending-record

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

Name: of

Return Type: MapDecorations

ZenScript
Copy
MapDecorations.of(decorations as MapDecorationsEntry[string]) as MapDecorations
ParameterType
Parameter
decorations
Type
MapDecorationsEntry[string]

Name: withDecoration

Return Type: MapDecorations

ZenScript
Copy
MapDecorations.withDecoration(name as string, entry as MapDecorationsEntry) as MapDecorations
ParameterType
Parameter
name
Type
string
Parameter
entry
Type
MapDecorationsEntry
NameTypeHas GetterHas Setter
Name
decorations
Type
MapDecorationsEntry[string]
Has Getter
true
Has Setter
false