SetResourceCommand

View source

ExtendsCommand

Sets one resource value, or one value inside an existing resource.

An empty path replaces the resource. Non-empty paths update the existing resource in place.

Constructor


constructor(resourceType: TypeId, value: unknown, path?: (string | number)[])

View source

Parameters

NameDescriptionDefault
resourceType——
value——
path?—[]

Properties


Methods


execute(world: World): void

View source

Parameters

NameDescriptionDefault
world——