[PR #3493] [CLOSED] Network: a world's data-pack biomes in the registry it sends and the client reads #5023

Closed
opened 2026-11-03 05:09:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3493
Author: @ThatCakeIsAPie
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: feat/datapack-biomes-3


📝 Commits (10+)

  • d1ef7b4 Worldgen: data packs' entries over the prepared bundles
  • 2566257 Worldgen: the generator loads a world's data packs over the bundles
  • b0e65de Data packs: a world's packs change its world generation
  • 0c63990 Section sets past 32 sections: SectionMask replaces the u32 column masks
  • a849545 Harness: chunks generated with a world's data packs against vanilla
  • 46c62bd LevelShape: each level's shape as one value, and the column its chunks hold
  • a6d8409 Light reads the chunk's column: flood fill, layers and relighting span its sections
  • c2b5547 World, streaming, meshing and the renderer read the level's column
  • fdb4e91 Saves read and write a chunk's own column, and SaveDir takes its level's shape
  • 9e91278 Chunk packets map between the level and the client's column by the level's shape

📊 Changes

120 files changed (+3792 additions, -770 deletions)

View changed files

📝 README.md (+1 -1)
📝 crates/horizon-client/examples/portal_scan_bench.rs (+5 -7)
📝 crates/horizon-client/examples/probe/mob_ai_probe.rs (+2 -2)
📝 crates/horizon-client/src/arrows.rs (+4 -4)
📝 crates/horizon-client/src/biome.rs (+233 -55)
📝 crates/horizon-client/src/chunk.rs (+356 -20)
📝 crates/horizon-client/src/chunk_map.rs (+3 -0)
📝 crates/horizon-client/src/collisions.rs (+1 -1)
📝 crates/horizon-client/src/datapack.rs (+131 -1)
📝 crates/horizon-client/src/entities/fluids.rs (+3 -3)
📝 crates/horizon-client/src/flatgen.rs (+16 -12)
📝 crates/horizon-client/src/game.rs (+66 -52)
📝 crates/horizon-client/src/game/agent.rs (+3 -2)
📝 crates/horizon-client/src/game/beacon.rs (+2 -2)
📝 crates/horizon-client/src/game/block_entity_anims.rs (+1 -1)
📝 crates/horizon-client/src/game/chat.rs (+1 -1)
📝 crates/horizon-client/src/game/commands.rs (+4 -6)
📝 crates/horizon-client/src/game/commands/execute.rs (+3 -3)
📝 crates/horizon-client/src/game/commands/terrain_cmds.rs (+3 -3)
📝 crates/horizon-client/src/game/commands/world_cmds.rs (+4 -4)

...and 80 more files

📄 Description

🤖 Opened by ThatCakeIsAPie's AI agent (Claude), not by ThatCakeIsAPie themself.

Builds on #3492 (feat/datapack-biomes-2): until that merges, its commits show here too; this PR's own change is the commit(s) on top.

What and why

Part 3 of 4 of data-pack biomes: over the network, so LAN guests and remote clients see a world's new biomes.

  • A host of a world whose packs add or change biomes (NetConfig.biomes, set by single player's integrated server, Open to LAN and the dedicated server) sends that world's biome registry (SyncData::registry_packets). That's its packs' biomes among vanilla's in Identifier order, with their data, since no client knows a world pack. Biome tag ids (SyncData::tags_packet) and chunk palettes (the LAN encoder's biome registry, SyncData::biome_registry) follow that order.
  • A remote client adds the server's biomes it lacks from the data sent (Biomes::with_packs over the built-in table) and meshes with them. Single player's client shares the table its server thread already set.

A world without pack biomes sends vanilla's registry, as before.

Vanilla reference

RegistrySynchronization / ClientboundRegistryDataPacket (a known pack's entries go without data; a world pack's always carry it), TagNetworkSerialization (tag ids in the registry's order), ClientRegistryLayer (the client builds its registries from what was sent).

Self-check

Tests

  • a_world_with_pack_biomes_sends_them_in_registry_order: a world with one new biome sends vanilla's biomes plus it, in Identifier order. A client that knows the vanilla pack gets data only for the new one, and a client that doesn't gets it for all. Biome tags name the world's ids, and without pack biomes the tags are vanilla's.
  • tests/lan_bot.rs (4 passed).

Run before this branch was rebased from upstream/main 56f968e11 onto fe3333f3f. After the rebase, CI's two clippy commands pass on it again, and pr_ready was re-run at the top of its series (#3494).

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-LT6RAH8, against upstream/main at 56f968e11, 5 min 23 s)

Check Result
Scope ⚠️ 121 files, +3784 −796; 4208 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 398 run, FAILED (failures=2, errors=8, skipped=1) (1 min 15 s)
rustfmt ✅ (11 s)
clippy ✅ (16 s)
tests: horizon-client, horizon-protocol, horizon-world ❌ 1108 passed, 2 failed (3 min 11 s)
doc tests ✅ 0 passed (25 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The Scope row counts the whole stack against upstream main; this PR's own part (over feat/datapack-biomes-2) is 7 files, +210 −32, 242 lines of code.

The Python tests fail on upstream main on this Windows machine too, more often there (main 56f968e11: failures=3, errors=13; path separators, symlink privilege). CI runs them on Linux.

crash::tests::stacks_start_at_the_panicking_frame and save::tests::session_lock_is_exclusive fail on upstream main here too (Windows only).

Suggested label: feature.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3493 **Author:** [@ThatCakeIsAPie](https://github.com/ThatCakeIsAPie) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/datapack-biomes-3` --- ### 📝 Commits (10+) - [`d1ef7b4`](https://github.com/horizon-rust/horizon/commit/d1ef7b4fb0f6eb9c642837d9941ef986129b93cc) Worldgen: data packs' entries over the prepared bundles - [`2566257`](https://github.com/horizon-rust/horizon/commit/25662576ff54bf5f4e2600ae0c5a1c588c911cb6) Worldgen: the generator loads a world's data packs over the bundles - [`b0e65de`](https://github.com/horizon-rust/horizon/commit/b0e65dec064bb142152fb6445fb5661aeac59ff0) Data packs: a world's packs change its world generation - [`0c63990`](https://github.com/horizon-rust/horizon/commit/0c639904f160ca8fec160a287e7aaa49156f65a9) Section sets past 32 sections: SectionMask replaces the u32 column masks - [`a849545`](https://github.com/horizon-rust/horizon/commit/a849545f63d0d91f4f7c51b8549f3206bc234149) Harness: chunks generated with a world's data packs against vanilla - [`46c62bd`](https://github.com/horizon-rust/horizon/commit/46c62bdf2a307b633d1ba6ea32b471ec0316c6d9) LevelShape: each level's shape as one value, and the column its chunks hold - [`a6d8409`](https://github.com/horizon-rust/horizon/commit/a6d8409466af6393be67ad2bf3a86b2fe8165906) Light reads the chunk's column: flood fill, layers and relighting span its sections - [`c2b5547`](https://github.com/horizon-rust/horizon/commit/c2b55479f119bb18bcd6fbbef33a1e23b8492086) World, streaming, meshing and the renderer read the level's column - [`fdb4e91`](https://github.com/horizon-rust/horizon/commit/fdb4e917c0be2d9f253883030e3df86a4490e0b6) Saves read and write a chunk's own column, and SaveDir takes its level's shape - [`9e91278`](https://github.com/horizon-rust/horizon/commit/9e912787941669987a711359429e2f0aee4d157c) Chunk packets map between the level and the client's column by the level's shape ### 📊 Changes **120 files changed** (+3792 additions, -770 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `crates/horizon-client/examples/portal_scan_bench.rs` (+5 -7) 📝 `crates/horizon-client/examples/probe/mob_ai_probe.rs` (+2 -2) 📝 `crates/horizon-client/src/arrows.rs` (+4 -4) 📝 `crates/horizon-client/src/biome.rs` (+233 -55) 📝 `crates/horizon-client/src/chunk.rs` (+356 -20) 📝 `crates/horizon-client/src/chunk_map.rs` (+3 -0) 📝 `crates/horizon-client/src/collisions.rs` (+1 -1) 📝 `crates/horizon-client/src/datapack.rs` (+131 -1) 📝 `crates/horizon-client/src/entities/fluids.rs` (+3 -3) 📝 `crates/horizon-client/src/flatgen.rs` (+16 -12) 📝 `crates/horizon-client/src/game.rs` (+66 -52) 📝 `crates/horizon-client/src/game/agent.rs` (+3 -2) 📝 `crates/horizon-client/src/game/beacon.rs` (+2 -2) 📝 `crates/horizon-client/src/game/block_entity_anims.rs` (+1 -1) 📝 `crates/horizon-client/src/game/chat.rs` (+1 -1) 📝 `crates/horizon-client/src/game/commands.rs` (+4 -6) 📝 `crates/horizon-client/src/game/commands/execute.rs` (+3 -3) 📝 `crates/horizon-client/src/game/commands/terrain_cmds.rs` (+3 -3) 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+4 -4) _...and 80 more files_ </details> ### 📄 Description > 🤖 Opened by ThatCakeIsAPie's AI agent (Claude), not by ThatCakeIsAPie themself. **Builds on #3492 (`feat/datapack-biomes-2`)**: until that merges, its commits show here too; this PR's own change is the commit(s) on top. ## What and why Part 3 of 4 of data-pack biomes: over the network, so LAN guests and remote clients see a world's new biomes. - A host of a world whose packs add or change biomes (`NetConfig.biomes`, set by single player's integrated server, Open to LAN and the dedicated server) sends that world's biome registry (`SyncData::registry_packets`). That's its packs' biomes among vanilla's in `Identifier` order, with their data, since no client knows a world pack. Biome tag ids (`SyncData::tags_packet`) and chunk palettes (the LAN encoder's biome registry, `SyncData::biome_registry`) follow that order. - A remote client adds the server's biomes it lacks from the data sent (`Biomes::with_packs` over the built-in table) and meshes with them. Single player's client shares the table its server thread already set. A world without pack biomes sends vanilla's registry, as before. ## Vanilla reference `RegistrySynchronization` / `ClientboundRegistryDataPacket` (a known pack's entries go without data; a world pack's always carry it), `TagNetworkSerialization` (tag ids in the registry's order), `ClientRegistryLayer` (the client builds its registries from what was sent). ## Self-check **Tests** - `a_world_with_pack_biomes_sends_them_in_registry_order`: a world with one new biome sends vanilla's biomes plus it, in `Identifier` order. A client that knows the vanilla pack gets data only for the new one, and a client that doesn't gets it for all. Biome tags name the world's ids, and without pack biomes the tags are vanilla's. - `tests/lan_bot.rs` (4 passed). Run before this branch was rebased from upstream/main 56f968e11 onto fe3333f3f. After the rebase, CI's two clippy commands pass on it again, and pr_ready was re-run at the top of its series (#3494). **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-LT6RAH8, against upstream/main at 56f968e11, 5 min 23 s) | Check | Result | | --- | --- | | Scope | ⚠️ 121 files, +3784 −796; 4208 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 398 run, FAILED (failures=2, errors=8, skipped=1) (1 min 15 s) | | rustfmt | ✅ (11 s) | | clippy | ✅ (16 s) | | tests: horizon-client, horizon-protocol, horizon-world | ❌ 1108 passed, 2 failed (3 min 11 s) | | doc tests | ✅ 0 passed (25 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The Scope row counts the whole stack against upstream main; this PR's own part (over `feat/datapack-biomes-2`) is 7 files, +210 −32, 242 lines of code. The Python tests fail on upstream main on this Windows machine too, more often there (main 56f968e11: failures=3, errors=13; path separators, symlink privilege). CI runs them on Linux. `crash::tests::stacks_start_at_the_panicking_frame` and `save::tests::session_lock_is_exclusive` fail on upstream main here too (Windows only). Suggested label: `feature`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:09:40 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5023
No description provided.