[PR #2981] [MERGED] Server dialogs and resource packs: draw every dialog control, open links, keep pack order and animation metadata like vanilla #4733

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2981
Author: @kacpherek
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: fix/dialogs-packs-parity


📝 Commits (10+)

  • aae98d3 Send vanilla's error text for an invalid login name
  • 6893bcf Cap server command suggestions at 1000
  • 04bc306 Take a texture's .mcmeta only from its own pack or a higher one
  • c291520 List built-in packs before folder packs in the pack screen
  • 559b836 Open links from dialog buttons through the link confirmation
  • 2ac08ef Draw dialog sliders, dropdowns, item bodies and dialog lists
  • 7711bfc Fail a dialog whose body or input cannot be read
  • f049a08 packs: keep the available packs in one id order, as PackRepository does
  • d026f1e Merge main into this branch
  • fff16ae Merge remote-tracking branch 'origin/main' into pt3/2981

📊 Changes

10 files changed (+510 additions, -91 deletions)

View changed files

📝 crates/horizon-client-render/src/packs.rs (+25 -1)
📝 crates/horizon-client/src/dialog.rs (+126 -25)
📝 crates/horizon-client/src/dialog_screen.rs (+125 -55)
📝 crates/horizon-client/src/game.rs (+9 -2)
📝 crates/horizon-client/src/game/dialogs.rs (+189 -5)
📝 crates/horizon-client/src/game/lan_actions.rs (+4 -1)
📝 crates/horizon-client/src/item_sync.rs (+3 -0)
📝 crates/horizon-client/src/lan/conn.rs (+8 -1)
📝 crates/horizon-client/src/net.rs (+1 -0)
📝 crates/horizon-protocol/src/registry.rs (+20 -1)

📄 Description

What and why

  • A server dialog now shows number sliders, dropdowns (cycle buttons), item bodies and the buttons of a dialog_list. Before, those were skipped: a dialog list menu showed only its Back button and an input the screen skipped sent its default and could not be changed. The client now keeps the server's minecraft:dialog tags so a #tag list resolves.
  • A dialog button with open_url goes through Web Links and Prompt on Links and the link confirmation screen, and the screen the dialog leaves comes back after it. With the prompt off the browser opens and the dialog stays, as in vanilla. suggest_command has no screen to take text, so it only closes the dialog; change_page is logged as an error. Before, all three were dropped with an info line.
  • A dialog with a body or input Horizon cannot read, a single option with no or two initial entries, or a text default longer than its limit is rejected whole. Horizon dropped the bad part and showed the rest.
  • A texture's .png.mcmeta now counts only when it comes from the pack that supplies the PNG or a pack above it. Before, a lower pack's (or vanilla's) animation ran on a higher pack's static PNG.
  • The pack screen lists the built-in packs first and the file/ packs after them, each group sorted by id. Before, all ids were sorted together.
  • A login name with bad characters gets vanilla's disconnect.genericReason text ("Internal Exception: java.lang.IllegalStateException: Invalid characters in username"). Before, it got multiplayer.disconnect.invalid_name, a key that does not exist.
  • Server command suggestions are cut at 1000 entries.

Vanilla reference

  • DialogListDialogScreen.java:23-37; ButtonListDialogScreen.java:23-33 (list buttons, exit in the footer)
  • InputControlHandlers.java:81-140 (NumberRangeHandler, SliderImpl), :142-152 (SingleOptionHandler); AbstractSliderButton.java (drag, sound on release); CycleButton.java:93-122 (Shift cycles back, wheel up goes back)
  • DialogBodyHandlers.java:63-108 (ItemHandler); ItemDisplayWidget.java:33-47
  • DialogScreen.java:200-218 (handleDialogClickEvent); Screen.java:281-330 (defaultHandleClickEvent, clickUrlAction)
  • SingleOptionInput.java:26; TextInput.java:26; Dialog.java:20-22
  • FallbackResourceManager.java:184 (metaResource.packIndex >= resource.packIndex)
  • PackRepository.java:41-48 (discoverAvailable, one sorted map per source)
  • ServerLoginPacketListenerImpl.java:119; Connection.java:118,134-140 (exceptionCaught)
  • ServerCommandSuggestionsProvider.java:54,62-64

Not changed

  • A dialog list opened during configuration resolves only inline dialogs: the client has no registry data until configuration ends (the same limit show_dialog by id already had).
  • Tags the server sends again in play (after a reload) are not re-read.
  • Status with replies off: vanilla's disconnect.ignoring_status_request is never sent (no disconnect packet exists in the status protocol), so the silent close already matches.
  • slow_login after 600 ticks: vanilla's 30 s read timeout fires first for a silent client, so the silent close matches for that case.

Self-check

clippy and fmt pass for horizon-client and horizon-protocol. Not run in game.

fixes #3150


🔄 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/2981 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/dialogs-packs-parity` --- ### 📝 Commits (10+) - [`aae98d3`](https://github.com/horizon-rust/horizon/commit/aae98d3db514ea88f1e1ac7f7558ef7624dfe199) Send vanilla's error text for an invalid login name - [`6893bcf`](https://github.com/horizon-rust/horizon/commit/6893bcff88b6e6eafa51ab22c904b50314667392) Cap server command suggestions at 1000 - [`04bc306`](https://github.com/horizon-rust/horizon/commit/04bc30606d09fa618f5e9fef8aec99839b895639) Take a texture's .mcmeta only from its own pack or a higher one - [`c291520`](https://github.com/horizon-rust/horizon/commit/c2915208fd69bdf0f706d701b17c6a60ae4a58ad) List built-in packs before folder packs in the pack screen - [`559b836`](https://github.com/horizon-rust/horizon/commit/559b83626f048f839ae24a353dfe06d71111a10f) Open links from dialog buttons through the link confirmation - [`2ac08ef`](https://github.com/horizon-rust/horizon/commit/2ac08efcb207ac910d88b2fd565dfc9d7b9a8f7a) Draw dialog sliders, dropdowns, item bodies and dialog lists - [`7711bfc`](https://github.com/horizon-rust/horizon/commit/7711bfcdc54697529dd49dfa324f261800875db6) Fail a dialog whose body or input cannot be read - [`f049a08`](https://github.com/horizon-rust/horizon/commit/f049a08e481f6bf21fce7e4eed055aa3d2a16645) packs: keep the available packs in one id order, as PackRepository does - [`d026f1e`](https://github.com/horizon-rust/horizon/commit/d026f1eb371d4f5b239765eeff364cfa51324f77) Merge main into this branch - [`fff16ae`](https://github.com/horizon-rust/horizon/commit/fff16ae2ed9a727d507dfe4830be2885859782cd) Merge remote-tracking branch 'origin/main' into pt3/2981 ### 📊 Changes **10 files changed** (+510 additions, -91 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/packs.rs` (+25 -1) 📝 `crates/horizon-client/src/dialog.rs` (+126 -25) 📝 `crates/horizon-client/src/dialog_screen.rs` (+125 -55) 📝 `crates/horizon-client/src/game.rs` (+9 -2) 📝 `crates/horizon-client/src/game/dialogs.rs` (+189 -5) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+4 -1) 📝 `crates/horizon-client/src/item_sync.rs` (+3 -0) 📝 `crates/horizon-client/src/lan/conn.rs` (+8 -1) 📝 `crates/horizon-client/src/net.rs` (+1 -0) 📝 `crates/horizon-protocol/src/registry.rs` (+20 -1) </details> ### 📄 Description ## What and why - A server dialog now shows number sliders, dropdowns (cycle buttons), item bodies and the buttons of a `dialog_list`. Before, those were skipped: a dialog list menu showed only its Back button and an input the screen skipped sent its default and could not be changed. The client now keeps the server's `minecraft:dialog` tags so a `#tag` list resolves. - A dialog button with `open_url` goes through Web Links and Prompt on Links and the link confirmation screen, and the screen the dialog leaves comes back after it. With the prompt off the browser opens and the dialog stays, as in vanilla. `suggest_command` has no screen to take text, so it only closes the dialog; `change_page` is logged as an error. Before, all three were dropped with an info line. - A dialog with a body or input Horizon cannot read, a single option with no or two initial entries, or a text default longer than its limit is rejected whole. Horizon dropped the bad part and showed the rest. - A texture's `.png.mcmeta` now counts only when it comes from the pack that supplies the PNG or a pack above it. Before, a lower pack's (or vanilla's) animation ran on a higher pack's static PNG. - The pack screen lists the built-in packs first and the `file/` packs after them, each group sorted by id. Before, all ids were sorted together. - A login name with bad characters gets vanilla's `disconnect.genericReason` text ("Internal Exception: java.lang.IllegalStateException: Invalid characters in username"). Before, it got `multiplayer.disconnect.invalid_name`, a key that does not exist. - Server command suggestions are cut at 1000 entries. ## Vanilla reference - DialogListDialogScreen.java:23-37; ButtonListDialogScreen.java:23-33 (list buttons, exit in the footer) - InputControlHandlers.java:81-140 (NumberRangeHandler, SliderImpl), :142-152 (SingleOptionHandler); AbstractSliderButton.java (drag, sound on release); CycleButton.java:93-122 (Shift cycles back, wheel up goes back) - DialogBodyHandlers.java:63-108 (ItemHandler); ItemDisplayWidget.java:33-47 - DialogScreen.java:200-218 (handleDialogClickEvent); Screen.java:281-330 (defaultHandleClickEvent, clickUrlAction) - SingleOptionInput.java:26; TextInput.java:26; Dialog.java:20-22 - FallbackResourceManager.java:184 (metaResource.packIndex >= resource.packIndex) - PackRepository.java:41-48 (discoverAvailable, one sorted map per source) - ServerLoginPacketListenerImpl.java:119; Connection.java:118,134-140 (exceptionCaught) - ServerCommandSuggestionsProvider.java:54,62-64 ## Not changed - A dialog list opened during configuration resolves only inline dialogs: the client has no registry data until configuration ends (the same limit `show_dialog` by id already had). - Tags the server sends again in play (after a reload) are not re-read. - `Status` with replies off: vanilla's `disconnect.ignoring_status_request` is never sent (no disconnect packet exists in the status protocol), so the silent close already matches. - `slow_login` after 600 ticks: vanilla's 30 s read timeout fires first for a silent client, so the silent close matches for that case. ## Self-check clippy and fmt pass for horizon-client and horizon-protocol. Not run in game. fixes #3150 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:32 +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#4733
No description provided.