[PR #4948] [MERGED] Create World: the preparing screen and the experimental-features warning #5967

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

📋 Pull Request Information

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

Base: main ← Head: feat/create-world-screens


📝 Commits (6)

  • dbfc38a Create World: the preparing read loads the chosen packs and takes no input
  • 162b972 Merge the stack below (main merged) into #4948
  • 8445b8d Create World preparing: keep the error screen, block typing, fix doc placement
  • c25c063 Merge the stack below (main merged) into #4948
  • 50c8a09 Merge fixes: the Data Packs reopen takes main's event loop, and the keyboard test passes the preparing screen
  • d5aef59 Merge main into #4948

📊 Changes

4 files changed (+222 additions, -13 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+54 -8)
📝 crates/horizon-client/src/game/world_loading.rs (+21 -0)
📝 crates/horizon-client/src/title.rs (+37 -2)
📝 crates/horizon-client/src/title/tests.rs (+110 -3)

📄 Description

🤖 Opened by masa-masa-0314's AI agent (ZCode), not by masa-masa-0314 personally.

What and why

Vanilla reads the world generation data behind a loading screen before the Create New World screen opens, again after its Data Packs or Experiments screen applied a selection, and warns before applying a selection that asks for experimental features. Horizon showed none of that.

  • createWorld.preparing (GenericMessageScreen: the menu background and the centred message on a black box with a 1-pixel border and 12 pixels of padding, no progress): Create New World reads vanillagen::shared_data on a worker while the title shows it, and opens the create screen when the read is done (openCreateWorldScreen's queued load screen); the Data Packs screen's Done and the Experiments screen's Done re-run the read the same way (applyNewPackConfig's dataPack.validation.working, with this PR keeping the preparing text).
  • ConfirmExperimentalFeaturesScreen: when the Data Packs screen's Done picks a feature pack, the warning comes up first — the title, the message wrapped to 310 and centred, a 100-wide Details button, Proceed and Back in the footer, the whole block centred, Escape declining. Its DetailsScreen lists the picked packs bold with the flags they ask for (selectWorld.experimental.details.entry). Proceed applies the selection, Back reopens the Data Packs screen on the selection it was opened with (tryApplyNewDataPacks's onAbort).

Stacked on #4619, whose Experiments screen and feature-pack plumbing the confirm screen builds on.

Vanilla reference

Decompiled from the 26.3 client jar (Vineflower):

  • CreateWorldScreen.openCreateWorldScreen — queueLoadScreen(PREPARING_WORLD_DATA) → background WorldLoader.load → managedBlock → setScreen(new CreateWorldScreen(...)); createNewWorld queues the same screen again; applyNewPackConfig shows dataPack.validation.working while the packs reload.
  • GenericMessageScreen + FocusableTextWidget — the message centred at (w/2 - tw/2, h/2 - 4.5), BackgroundFill.ALWAYS's black box, the builder's 12 as the padding on every side.
  • ConfirmExperimentalFeaturesScreen + DetailsScreen — the centered grid (columnSpacing(10), rowSpacing(20)), MultiLineTextWidget at 310 centred, DETAILS_BUTTON_WIDTH = 100, GUI_PROCEED/GUI_BACK in the footer, onClose declining; the details list's bold pack titles and selectWorld.experimental.details.entry with FeatureFlags.printMissingFlags(VANILLA_SET, ...)'s flag names.

Self-check

Check Result
rustfmt ✅
clippy (-D warnings) ✅
tests ✅ client 906, render 688, world 227 — all passing (upstream main at d4c60e0ac compiles and tests clean on Windows again after its fs4 fix)

The one updated test, classic_navigation_buttons_sound_even_without_a_game_action, now steps over the preparing screen the Create New World button starts, as the game does (openCreateWorldScreen).

Screenshots

Not included: this machine's offscreen renderer draws a blank window. The user tests the screens in-game.


🔄 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/4948 **Author:** [@masa-masa-0314](https://github.com/masa-masa-0314) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/create-world-screens` --- ### 📝 Commits (6) - [`dbfc38a`](https://github.com/horizon-rust/horizon/commit/dbfc38af70d43665acf893d040f4cd2b943e6aa3) Create World: the preparing read loads the chosen packs and takes no input - [`162b972`](https://github.com/horizon-rust/horizon/commit/162b972ac322659e0a155f56d61ab1c93f482079) Merge the stack below (main merged) into #4948 - [`8445b8d`](https://github.com/horizon-rust/horizon/commit/8445b8d3e743a660a80f0de7aa21f8f0ee1e2851) Create World preparing: keep the error screen, block typing, fix doc placement - [`c25c063`](https://github.com/horizon-rust/horizon/commit/c25c063045b2a6d6acb6fd12de116899bc565747) Merge the stack below (main merged) into #4948 - [`50c8a09`](https://github.com/horizon-rust/horizon/commit/50c8a09d23bfe49c0db6b27c22c3599476928249) Merge fixes: the Data Packs reopen takes main's event loop, and the keyboard test passes the preparing screen - [`d5aef59`](https://github.com/horizon-rust/horizon/commit/d5aef59f19433e1603308a27f84de68a28ddefa2) Merge main into #4948 ### 📊 Changes **4 files changed** (+222 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+54 -8) 📝 `crates/horizon-client/src/game/world_loading.rs` (+21 -0) 📝 `crates/horizon-client/src/title.rs` (+37 -2) 📝 `crates/horizon-client/src/title/tests.rs` (+110 -3) </details> ### 📄 Description > 🤖 Opened by masa-masa-0314's AI agent (ZCode), not by masa-masa-0314 personally. ## What and why Vanilla reads the world generation data behind a loading screen before the Create New World screen opens, again after its Data Packs or Experiments screen applied a selection, and warns before applying a selection that asks for experimental features. Horizon showed none of that. - **`createWorld.preparing`** (`GenericMessageScreen`: the menu background and the centred message on a black box with a 1-pixel border and 12 pixels of padding, no progress): Create New World reads `vanillagen::shared_data` on a worker while the title shows it, and opens the create screen when the read is done (`openCreateWorldScreen`'s queued load screen); the Data Packs screen's Done and the Experiments screen's Done re-run the read the same way (`applyNewPackConfig`'s `dataPack.validation.working`, with this PR keeping the preparing text). - **`ConfirmExperimentalFeaturesScreen`**: when the Data Packs screen's Done picks a feature pack, the warning comes up first — the title, the message wrapped to 310 and centred, a 100-wide Details button, Proceed and Back in the footer, the whole block centred, Escape declining. Its `DetailsScreen` lists the picked packs bold with the flags they ask for (`selectWorld.experimental.details.entry`). Proceed applies the selection, Back reopens the Data Packs screen on the selection it was opened with (`tryApplyNewDataPacks`'s `onAbort`). Stacked on #4619, whose Experiments screen and feature-pack plumbing the confirm screen builds on. ## Vanilla reference Decompiled from the 26.3 client jar (Vineflower): - `CreateWorldScreen.openCreateWorldScreen` — `queueLoadScreen(PREPARING_WORLD_DATA)` → background `WorldLoader.load` → `managedBlock` → `setScreen(new CreateWorldScreen(...))`; `createNewWorld` queues the same screen again; `applyNewPackConfig` shows `dataPack.validation.working` while the packs reload. - `GenericMessageScreen` + `FocusableTextWidget` — the message centred at `(w/2 - tw/2, h/2 - 4.5)`, `BackgroundFill.ALWAYS`'s black box, the builder's 12 as the padding on every side. - `ConfirmExperimentalFeaturesScreen` + `DetailsScreen` — the centered grid (`columnSpacing(10)`, `rowSpacing(20)`), `MultiLineTextWidget` at 310 centred, `DETAILS_BUTTON_WIDTH = 100`, `GUI_PROCEED`/`GUI_BACK` in the footer, `onClose` declining; the details list's bold pack titles and `selectWorld.experimental.details.entry` with `FeatureFlags.printMissingFlags(VANILLA_SET, ...)`'s flag names. ## Self-check | Check | Result | | --- | --- | | rustfmt | ✅ | | clippy (`-D warnings`) | ✅ | | tests | ✅ client 906, render 688, world 227 — all passing (upstream `main` at `d4c60e0ac` compiles and tests clean on Windows again after its `fs4` fix) | The one updated test, `classic_navigation_buttons_sound_even_without_a_game_action`, now steps over the preparing screen the Create New World button starts, as the game does (`openCreateWorldScreen`). ## Screenshots Not included: this machine's offscreen renderer draws a blank window. The user tests the screens in-game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:16:16 +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#5967
No description provided.