Update modding docs

This commit is contained in:
2026-09-29 23:29:14 -03:00
parent f0cf4e4eeb
commit 1ac7a5c943
50 changed files with 2672 additions and 1924 deletions
+36
View File
@@ -0,0 +1,36 @@
# Textures
Every `.png` in a mod's `textures/` folder becomes a texture that blocks, items, entities and screens can use.
## Texture Ids
A texture's id is `<mod id>:<file name without .png>`. Subfolders are joined with `_`, so in the mod `copper_tools`:
| File | Texture id |
| --------------------------- | --------------------------- |
| `textures/copper_block.png` | `copper_tools:copper_block` |
| `textures/ores/tin.png` | `copper_tools:ores_tin` |
Any mod can use any texture by its id, including the base game's, like `bworld:stone`.
## Sizes
Textures can be any size up to 256×256. Blocks and items are made for 16×16 and stretch a texture of another size over
the same face, so a 32×32 block texture is just a sharper one. Larger ones are for things like entity skins.
## Missing Textures
A texture id that doesn't exist shows the magenta and black checker, `engine:missing`, and `check-mods` warns about it.
It isn't an error, so a mod still loads while its art is unfinished.
## Engine Textures
The engine's own textures use the `engine` namespace and come from `assets/`, not from a mod:
- `engine:missing`, the missing texture,
- `engine:break_0` to `engine:break_8`, the cracks drawn on a block being broken.
## How Players Get Them
Textures go in the mod's `.bmod`. When a player joins, their client puts every mod's textures into one atlas. The server
never decodes images.