Block registry api

This commit is contained in:
2026-11-12 20:41:13 -03:00
parent e7fe663746
commit 76802ed430
39 changed files with 499 additions and 100 deletions
+8 -5
View File
@@ -31,17 +31,20 @@ The server and every client load mods the same way, in the same order:
1. **Order.** Dependencies come before the mods that need them, and otherwise mods load alphabetically. Mods that depend
on each other in a circle are an error. The server sends its order to clients, and they follow it.
2. **Data**, one mod at a time: its block models, blocks (and their items), items, entity models, entities, effects and
fluids. Then every mod's [tags](../resources/tags.md), merged in load order, then each mod's recipes and ores, which
can use tags.
2. **Data**, one mod at a time: its block models, blocks (and their items), including the ones its
[content script](sides.md#content-scripts) registers, after its `blocks/` files, items, entity models, entities,
effects and fluids. Then every mod's [tags](../resources/tags.md), merged in load order, then each mod's recipes and
ores, which can use tags.
3. **Scripts.** Server scripts' `setup` runs on the server, and client scripts' on each client. Worldgen scripts'
`setup` runs on the server before it makes chunks.
Scripts read the registries but can't add to them. Content comes from data files.
Scripts read the registries but can't add to them. Content comes from data files, and from content scripts, which the
server runs when it loads mods, before anything else, and whose blocks go to players as data.
> [!IMPORTANT]
> The server and the client must end up with exactly the same blocks, items and recipes. They do as long as content is
> only data, since both load the same files in the same order.
> only data, since both load the same files in the same order. Content scripts only run on the server, and players get
> what they made as data.
## Numeric Ids