Change default view distance to 16 and add /viewdistance command

This commit is contained in:
2026-10-02 19:01:08 -03:00
parent a4fec0681f
commit 3202c18ab5
7 changed files with 56 additions and 12 deletions
+1
View File
@@ -117,5 +117,6 @@ Commands can only be registered during `setup`.
| `/tp <x> <y> <z>` | Teleports you there |
| `/fly` | Toggles flying: jump goes up, sneak goes down, sprint goes faster |
| `/tps` | Shows how the game loop keeps up |
| `/viewdistance [chunks]` | Shows or changes how far the server sends chunks, until it restarts |
| `/skin [url] [slim\|normal]` | Changes your skin to a 64×64 PNG, or back to the default |
| `/help [command]` | Every command's usage, or one's |
+1 -1
View File
@@ -48,7 +48,7 @@ stay on the server.
- Chunks are 16×256×16 and sent whole, compressed, in batches, nearest first. The server paces batches by how fast each
client says it loads them.
- Players see chunks up to their view distance, at most 10 on the server's side. Light isn't sent: clients light chunks
- Players see chunks up to their view distance, at most 16 on the server's side. Light isn't sent: clients light chunks
themselves.
- Block changes go only to players who have the chunk. Everyone else gets the change with the chunk when they come
close.
+1 -1
View File
@@ -299,7 +299,7 @@ How the server sends the world, like Minecraft Java since 1.20.2. The code is in
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 10 chunks, and
- **The view.** Players send their view distance with `ready` and `view_distance`. The server uses up to 16 chunks, and
sends a round area around the player plus the ring past it, which clients need to mesh and light the edge (Minecraft's
`ChunkTrackingView`). Moving into another chunk sends `set_center_chunk`, and `forget_level_chunk` for each chunk that
left the view.