API reference
Content types
Content is declared as JSON files, listed under "content" in mod.json, or registered from a script with content.register.
blocks
Blocks players can build with. Each is based on one of the game's blocks, with your model, picture, sounds and settings — and may redescribe its size and faces, spinning parts, a round footprint, gear teeth (it meshes with every gear) and a whole mechanism of settings, keys, wires and a shaft drive, all run natively.
{
"id": "brass-gear",
"name": "Brass Gear 32",
"base": "Cube",
"model": "/models/gear32.glb",
"gear": {
"kind": "spur",
"teeth": 32
},
"icon": "/icons/gear32.png"
}maps
Maps players can choose, built on one of the game's own maps with your terrain, props, lighting, sounds and effects.
{
"id": "crater-canyon",
"name": "Crater Canyon",
"base": "Empty",
"spawns": [
{
"position": [
0,
2,
0
]
}
],
"objects": [
{
"model": "/models/canyon.glb",
"collider": "mesh"
}
]
}