30 lines
1.7 KiB
Markdown
30 lines
1.7 KiB
Markdown
# Example Mod
|
||
|
||
A bworld mod. `MODS.md` at the root of the bworld repo links to the modding docs.
|
||
|
||
## Files
|
||
|
||
| Path | What it's for |
|
||
| -------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||
| `manifest.json` | The mod's id, name, version, dependencies and script. |
|
||
| `blocks/*.json` | One block per file. Blocks get an item form with the same id unless `"item": false`. |
|
||
| `items/*.json` | Items that aren't a block's item form. |
|
||
| `recipes/*.json` | `shaped` crafting, `furnace` smelting and `fuel`. |
|
||
| `textures/*.png` | 16×16 textures, named `example_mod:<file name>`. |
|
||
| `worldgen/ores.json` | Ores to generate (optional, not included here). |
|
||
| `scripts/main.ts` | Its exports are phases: `server` for game logic, `client` for screens and the HUD, `worldgen` for features. |
|
||
| `CREDITS.md` | Licenses and thanks, shown on the About page. |
|
||
|
||
Delete what you don't use. A phase you don't need is an export you leave out.
|
||
|
||
## Checking it
|
||
|
||
From the bworld repo:
|
||
|
||
```sh
|
||
deno task check-mods
|
||
```
|
||
|
||
This validates the manifest and every data file, checks that the ids, textures and items you refer to exist, and
|
||
typechecks the scripts.
|