World shape for dimension

This commit is contained in:
2026-11-06 22:49:43 -03:00
parent 7458a2d42a
commit 818ce22dd6
60 changed files with 749 additions and 349 deletions
+4 -4
View File
@@ -303,10 +303,10 @@ engine assets in `assets/`.
How the server sends the world, like Minecraft Java since 1.20.2. The code is in `common/chunk_streaming.ts`,
`server/game/player_chunks.ts` and `client/level/client_level.ts`.
- **Whole chunks.** A `level_chunk` is a binary websocket message with every block of a 16×256×16 chunk and its columns'
biomes, deflated. Blocks are in 16 sections of 16×16×16, each a paletted container like Minecraft's: one value when
the section is all one block, a palette and 1, 2, 4 or 8 bits per block up to 256 kinds, and whole values past that.
Light isn't sent.
- **Whole chunks.** A `level_chunk` is a binary websocket message with every block of a chunk, as tall as the dimension,
and its columns' biomes, deflated. Blocks are in sections of 16×16×16 from the bottom up, each a paletted container
like Minecraft's: one value when the section is all one block, a palette and 1, 2, 4 or 8 bits per block up to 256
kinds, and whole values past that. Light isn't sent.
- **Numeric ids.** Chunks use the server's numeric block ids, and `join.blocks` lists the string id for each, like
Minecraft's registry sync. Clients translate them as a chunk loads.
- **The view.** Players send their view distance with `ready` and `view_distance`. The server uses up to 16 chunks, and