defineBlockSet
defineBlockSet<
Name>(name,options):BlockSet<Name>
Declares a block set under name at module scope, in a module
src/game.ts imports, so the room, every page and the cli find it by
the name a map file’s blockSet gives.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Name extends string |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
options |
BlockSetOptions<Name> |
Returns
Section titled “Returns”BlockSet<Name>
Example
Section titled “Example”export const village = defineBlockSet("village", { blocks: { grass: { top: "#4a7d3a", side: "#6b5a4a" }, stairs: { top: "#9aa3ad", stairs: true }, }, });