[PR #5557] [MERGED] Send the dialogs a client knows from the core pack without data #6349

Closed
opened 2026-11-03 06:19:04 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5557
Author: @rdbtCVS
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/dialog-registry-known-pack


📝 Commits (3)

  • d078454 Send the dialogs a client knows from the core pack without data
  • 56213a8 Merge main into #5557 (lan_bot strict again over #5559)
  • 6fe69ea lan_bot: the known-pack check is strict again, dialogs included

📊 Changes

2 files changed (+31 additions, -10 deletions)

View changed files

📝 crates/horizon-client/src/lan/data.rs (+28 -5)
📝 crates/horizon-client/tests/lan_bot.rs (+3 -5)

📄 Description

🤖 Opened by rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not by rdbtCVS personally.

Fixes #5525

Cause

#4698 (quick actions) added an exception in SyncData::registry_packets (crates/horizon-client/src/lan/data.rs) so minecraft:dialog always carried its entries' data, assuming a client does not rebuild dialogs from its known pack. Vanilla's client does rebuild them. RegistrySynchronization.packRegistry leaves out the data of every entry that comes from a pack the client knows (minecraft:core). So when a vanilla client said it knows the core pack, Horizon's server sent the dialog registry in full, while vanilla sends PackedRegistryEntry[id=minecraft:custom_options, data=Optional.empty], .... That is the dedicated_server line (sha=708cb7c5b9eb423d).

Fix

Remove the exception: dialogs follow the same rule as the other synchronized registries.

  • An entry from the resource root goes without data to a client that knows the core pack.
  • An entry that a world's data pack adds or replaces is marked from_pack (already there from #4698) and still goes with its data, as vanilla does for a datapack override. Quick actions supplied by a data pack still reach every client.
  • Horizon's own client answers SelectKnownPacks with no packs (net.rs), so it keeps getting every dialog in full. Its quick actions, pause screen additions and show_dialog are unaffected.

New unit test lan::data::tests::known_pack_dialogs_are_sent_without_data.

Proof

  • python3 tools/parity.py dedicated_server on origin/main (a4873dec4): FAIL, with the dialog registry_data line differing. With this branch: PASS (twice).
  • cargo test -p horizon-client --lib lan::data: 5 passed. cargo clippy -p horizon-client --all-targets -- -D warnings and cargo fmt --check: clean.

Not covered here:

  • One run on main, and one on this branch before the final runs, also showed an extra play-start minecraft:update_attributes line. Horizon's server sends the joining player block_interaction_range 4.5, movement_speed 0.1 and entity_interaction_range 3.0 at their base values with no modifiers (the dirty-attribute send in Hub, lan/hub.rs). Vanilla sends none. Whether the line falls inside the compared window depends on timing, so the harness can still flake on it. This is a separate issue.
  • The issue's other failures: lunge_motion was seen passing on other runs, and online_mode is fixed by #5508.

🤖 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/5557 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/dialog-registry-known-pack` --- ### 📝 Commits (3) - [`d078454`](https://github.com/horizon-rust/horizon/commit/d078454256a4e65355c878ff732b18e61db67844) Send the dialogs a client knows from the core pack without data - [`56213a8`](https://github.com/horizon-rust/horizon/commit/56213a81487741cdebeda886e8dc84dc12a55150) Merge main into #5557 (lan_bot strict again over #5559) - [`6fe69ea`](https://github.com/horizon-rust/horizon/commit/6fe69eac3c2ba70aaad085809db4e4bc781fb50a) lan_bot: the known-pack check is strict again, dialogs included ### 📊 Changes **2 files changed** (+31 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/lan/data.rs` (+28 -5) 📝 `crates/horizon-client/tests/lan_bot.rs` (+3 -5) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not by rdbtCVS personally. Fixes #5525 ## Cause #4698 (quick actions) added an exception in `SyncData::registry_packets` (`crates/horizon-client/src/lan/data.rs`) so `minecraft:dialog` always carried its entries' data, assuming a client does not rebuild dialogs from its known pack. Vanilla's client does rebuild them. `RegistrySynchronization.packRegistry` leaves out the data of every entry that comes from a pack the client knows (`minecraft:core`). So when a vanilla client said it knows the core pack, Horizon's server sent the dialog registry in full, while vanilla sends `PackedRegistryEntry[id=minecraft:custom_options, data=Optional.empty], ...`. That is the `dedicated_server` line (`sha=708cb7c5b9eb423d`). ## Fix Remove the exception: dialogs follow the same rule as the other synchronized registries. - An entry from the resource root goes without data to a client that knows the core pack. - An entry that a world's data pack adds or replaces is marked `from_pack` (already there from #4698) and still goes with its data, as vanilla does for a datapack override. Quick actions supplied by a data pack still reach every client. - Horizon's own client answers `SelectKnownPacks` with no packs (`net.rs`), so it keeps getting every dialog in full. Its quick actions, pause screen additions and `show_dialog` are unaffected. New unit test `lan::data::tests::known_pack_dialogs_are_sent_without_data`. ## Proof - `python3 tools/parity.py dedicated_server` on origin/main (a4873dec4): FAIL, with the dialog `registry_data` line differing. With this branch: **PASS** (twice). - `cargo test -p horizon-client --lib lan::data`: 5 passed. `cargo clippy -p horizon-client --all-targets -- -D warnings` and `cargo fmt --check`: clean. Not covered here: - One run on main, and one on this branch before the final runs, also showed an extra `play-start minecraft:update_attributes` line. Horizon's server sends the joining player block_interaction_range 4.5, movement_speed 0.1 and entity_interaction_range 3.0 at their base values with no modifiers (the dirty-attribute send in `Hub`, `lan/hub.rs`). Vanilla sends none. Whether the line falls inside the compared window depends on timing, so the harness can still flake on it. This is a separate issue. - The issue's other failures: `lunge_motion` was seen passing on other runs, and `online_mode` is fixed by #5508. 🤖 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 06:19:04 +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#6349
No description provided.