[PR #4337] [CLOSED] Create New World: enable Experiments and accept packs dropped on the window #5569

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4337
Author: @masa-masa-0314
Created: 10/30/2026
Status: ❌ Closed

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


📝 Commits (1)

  • fa03044 Create New World: the Experiments screen and dropping packs on the window

📊 Changes

7 files changed (+365 additions, -14 deletions)

View changed files

📝 crates/horizon-client-render/src/datapack.rs (+53 -0)
📝 crates/horizon-client/src/game.rs (+6 -0)
📝 crates/horizon-client/src/game/startup_menu.rs (+7 -0)
📝 crates/horizon-client/src/title.rs (+69 -1)
📝 crates/horizon-client/src/title/create_world.rs (+2 -11)
➕ crates/horizon-client/src/title/experiments.rs (+226 -0)
📝 crates/horizon-client/src/title/tests.rs (+2 -2)

📄 Description

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

What and why

The Create New World screen's Experiments button was drawn disabled
(// Experiments have no screen yet). It opens vanilla's ExperimentsScreen:
each feature pack the jar ships under data/minecraft/datapacks, a 44-wide
on/off switch at the right of its row, its description grey underneath, the red
warning wrapped to 310 and centred, Done and Cancel in the footer — vanilla's
HeaderAndFooterLayout + SwitchGrid geometry. Switching one adds or removes
that id in the world's data pack selection, so the Data Packs screen and the
world's DataPacks see it.

The other half is dropping a pack on the window
(PackSelectionScreen.onFilesDrop): a zip, a pack folder, or a folder holding
exactly one pack is copied into the create screen's pack folder, where the Data
Packs screen's existing folder watcher lists it within a second. Anything else
is refused and logged. Resource packs get the same drop.

Vanilla reference

  • net.minecraft.client.gui.screens.worldselection.ExperimentsScreen — the
    switches (SwitchGrid.builder(299).withInfoUnderneath(2, true)), the red
    selectWorld.experiments.info, getHumanReadableTitle (dataPack.<id>.name).
  • net.minecraft.client.gui.layouts.HeaderAndFooterLayout.arrangeElements —
    header 33, contents at headerHeight + 30, footer 33.
  • net.minecraft.client.gui.screens.packs.PackSelectionScreen.onFilesDrop
    and its PackDetector — what counts as a pack, copied into the pack folder
    and reloaded.

Self-check

pr_ready (tools/pr_ready.py --base upstream/main on DESKTOP-3050AHP, against upstream/main at 33f417fb3)

Check Result
Scope ✅ 7 files, +365 −14
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 480 run, FAILED (errors=1, skipped=1)
rustfmt ✅
clippy ✅
tests: horizon-client, horizon-client-render ❌ 726 passed, 1 failed
doc tests ✅
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses

The one horizon-client failure is pre-existing on this Windows machine:
title::tests::each_world_preset_writes_its_own_generator makes a folder named
after a preset id (minecraft:normal — : is not a path character on Windows)
and fails on clean upstream/main the same way. create_world_tabs_follow_vanilla_and_their_choices_reach_the_action
was updated: it asserted the Experiments button was disabled.

Screenshots

Not attached: this machine's offscreen renderer is blank and the agent workflow
asks not to open a visible window unasked. The screen is a port of vanilla's,
layout and text keys as listed above.


🔄 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/4337 **Author:** [@masa-masa-0314](https://github.com/masa-masa-0314) **Created:** 10/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/create-world-experiments` --- ### 📝 Commits (1) - [`fa03044`](https://github.com/horizon-rust/horizon/commit/fa03044b2a5a6622c1ef6333e40831205e6f7413) Create New World: the Experiments screen and dropping packs on the window ### 📊 Changes **7 files changed** (+365 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/datapack.rs` (+53 -0) 📝 `crates/horizon-client/src/game.rs` (+6 -0) 📝 `crates/horizon-client/src/game/startup_menu.rs` (+7 -0) 📝 `crates/horizon-client/src/title.rs` (+69 -1) 📝 `crates/horizon-client/src/title/create_world.rs` (+2 -11) ➕ `crates/horizon-client/src/title/experiments.rs` (+226 -0) 📝 `crates/horizon-client/src/title/tests.rs` (+2 -2) </details> ### 📄 Description > 🤖 Opened by masa-masa-0314's AI agent (ZCode), not by masa-masa-0314 personally. ## What and why The Create New World screen's **Experiments** button was drawn disabled (`// Experiments have no screen yet`). It opens vanilla's `ExperimentsScreen`: each feature pack the jar ships under `data/minecraft/datapacks`, a 44-wide on/off switch at the right of its row, its description grey underneath, the red warning wrapped to 310 and centred, Done and Cancel in the footer — vanilla's `HeaderAndFooterLayout` + `SwitchGrid` geometry. Switching one adds or removes that id in the world's data pack selection, so the Data Packs screen and the world's `DataPacks` see it. The other half is **dropping a pack on the window** (`PackSelectionScreen.onFilesDrop`): a zip, a pack folder, or a folder holding exactly one pack is copied into the create screen's pack folder, where the Data Packs screen's existing folder watcher lists it within a second. Anything else is refused and logged. Resource packs get the same drop. ## Vanilla reference - `net.minecraft.client.gui.screens.worldselection.ExperimentsScreen` — the switches (`SwitchGrid.builder(299).withInfoUnderneath(2, true)`), the red `selectWorld.experiments.info`, `getHumanReadableTitle` (`dataPack.<id>.name`). - `net.minecraft.client.gui.layouts.HeaderAndFooterLayout.arrangeElements` — header 33, contents at `headerHeight + 30`, footer 33. - `net.minecraft.client.gui.screens.packs.PackSelectionScreen.onFilesDrop` and its `PackDetector` — what counts as a pack, copied into the pack folder and reloaded. ## Self-check **pr_ready** (`tools/pr_ready.py --base upstream/main` on DESKTOP-3050AHP, against upstream/main at 33f417fb3) | Check | Result | | --- | --- | | Scope | ✅ 7 files, +365 −14 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 480 run, FAILED (errors=1, skipped=1) | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-client, horizon-client-render | ❌ 726 passed, 1 failed | | doc tests | ✅ | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | The one `horizon-client` failure is pre-existing on this Windows machine: `title::tests::each_world_preset_writes_its_own_generator` makes a folder named after a preset id (`minecraft:normal` — `:` is not a path character on Windows) and fails on clean `upstream/main` the same way. `create_world_tabs_follow_vanilla_and_their_choices_reach_the_action` was updated: it asserted the Experiments button was disabled. ## Screenshots Not attached: this machine's offscreen renderer is blank and the agent workflow asks not to open a visible window unasked. The screen is a port of vanilla's, layout and text keys as listed above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:13:27 +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#5569
No description provided.