[PR #3165] [CLOSED] Feature: creative tabs for content mods, and the mods' item panel beside the creative screen #4826

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3165
Author: @I114rk
Created: 10/28/2026
Status: ❌ Closed

Base: main ← Head: feature/creative-tabs-and-browser-on-creative


📝 Commits (2)

  • 6b01e13 Creative tabs for content mods, and the mods' item panel beside the creative screen
  • 2cf9a8c Regenerate the mod API reference for the ui capability wording

📊 Changes

13 files changed (+508 additions, -34 deletions)

View changed files

📝 crates/horizon-client/src/creative.rs (+180 -5)
📝 crates/horizon-client/src/game.rs (+15 -3)
📝 crates/horizon-client/src/game/control.rs (+1 -1)
📝 crates/horizon-client/src/game/mod_browser.rs (+6 -3)
📝 crates/horizon-client/src/game/mod_input.rs (+3 -3)
📝 crates/horizon-client/src/mod_content.rs (+62 -0)
📝 crates/horizon-client/src/mod_content_tests.rs (+25 -3)
📝 crates/horizon-mod-sdk/wit/horizon.wit (+4 -4)
📝 crates/horizon-mods/src/content.rs (+177 -1)
📝 docs/api/mods-reference.md (+1 -1)
📝 docs/modpacks.md (+6 -1)
📝 docs/mods.md (+20 -1)
📝 mods/official/recipes/src/lib.rs (+8 -8)

📄 Description

🤖 Opened by I114rk's AI agent (OpenCode, GLM 5.3 Flash), not by I114rk himself.

What and why

Content mods could not reach the creative inventory: a declared block item or item
(data/<id>/horizon/{block,item}/*.json) appeared in no tab and not in search. This adds a
data-driven creative-tabs API in the registries' style, and puts the mods' item panel
(browser) beside the creative screen:

  1. tab on declared items: a block item or item takes "tab": "minecraft:combat" (a
    vanilla category) or "tab": "ruby:main" (the mod's own tab). Without it the item is in no
    tab, as before. Tabbed items join the search tab, matched by their id and display name as
    the legacy export's are.

  2. A mod's own tabs: data/<id>/horizon/creative_tab/<path>.json —
    {"icon": "ruby:ruby", "name": "Ruby"} (name optional). The title localizes through the
    mod's lang files' itemGroup.<mod id>.<path>, else the English name, else the prettified
    path. Vanilla has no free tab slot (both rows are full: categories, hotbar, search,
    inventory), so the game wraps the mods' tabs onto rows above vanilla's, 5 left-aligned
    columns a row, reusing vanilla's tab sprites 1–5: the vanilla look, no new art.

  3. Plumbing: the overlay's build collects the additions into creative-mods.json (tab id
    → plain stacks; the mod's tabs carry icon and title), and Creative::load merges it over
    the vanilla export. With no mods the root is the base root and nothing changes — the
    creative parity harness covers that path.

  4. Fences: a tab outside vanilla's ten categories or the mod's declared tabs, a tab on
    a block without item: true, and a tab icon that is neither vanilla nor the mod's own are
    refused at load, like the registries' other fences.

  5. The mods' item panel on the creative screen: browser now shows beside the creative
    screen as it does beside inventory and containers (container_image already measured the
    creative window). A click on the panel is taken before the grid's, its search box takes
    keys when focused, and a mod's registered key (R/U) works over any slot or panel item
    there. The official Recipes mod needs no code change; its description now says so.

Aware of #3149 (creative click syncing): the same screen, a different behaviour — no
functional overlap beyond click_creative's first lines; happy to rebase.

Label: feature — players get content-mod items in the creative inventory and the recipe
viewer on the creative screen. Not a fix.

Fresh builds of this branch land on the fork first and may be ahead of what is PR'd here:
https://github.com/I114rk/forkizon

Self-check (python3 tools/pr_ready.py --quick): was interrupted and is
running again — its block lands here (and in a comment) when it finishes.

🤖 Generated with OpenCode, GLM


🔄 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/3165 **Author:** [@I114rk](https://github.com/I114rk) **Created:** 10/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/creative-tabs-and-browser-on-creative` --- ### 📝 Commits (2) - [`6b01e13`](https://github.com/horizon-rust/horizon/commit/6b01e13fa671d6b3ee7fb0f6bb4371d135064a39) Creative tabs for content mods, and the mods' item panel beside the creative screen - [`2cf9a8c`](https://github.com/horizon-rust/horizon/commit/2cf9a8cbae4bb56317f639ff90875a7ec5bcac6c) Regenerate the mod API reference for the ui capability wording ### 📊 Changes **13 files changed** (+508 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/creative.rs` (+180 -5) 📝 `crates/horizon-client/src/game.rs` (+15 -3) 📝 `crates/horizon-client/src/game/control.rs` (+1 -1) 📝 `crates/horizon-client/src/game/mod_browser.rs` (+6 -3) 📝 `crates/horizon-client/src/game/mod_input.rs` (+3 -3) 📝 `crates/horizon-client/src/mod_content.rs` (+62 -0) 📝 `crates/horizon-client/src/mod_content_tests.rs` (+25 -3) 📝 `crates/horizon-mod-sdk/wit/horizon.wit` (+4 -4) 📝 `crates/horizon-mods/src/content.rs` (+177 -1) 📝 `docs/api/mods-reference.md` (+1 -1) 📝 `docs/modpacks.md` (+6 -1) 📝 `docs/mods.md` (+20 -1) 📝 `mods/official/recipes/src/lib.rs` (+8 -8) </details> ### 📄 Description > 🤖 Opened by I114rk's AI agent (OpenCode, GLM 5.3 Flash), not by I114rk himself. ## What and why Content mods could not reach the creative inventory: a declared block item or item (`data/<id>/horizon/{block,item}/*.json`) appeared in no tab and not in search. This adds a data-driven creative-tabs API in the registries' style, and puts the mods' item panel (`browser`) beside the creative screen: 1. **`tab` on declared items**: a block item or item takes `"tab": "minecraft:combat"` (a vanilla category) or `"tab": "ruby:main"` (the mod's own tab). Without it the item is in no tab, as before. Tabbed items join the search tab, matched by their id and display name as the legacy export's are. 2. **A mod's own tabs**: `data/<id>/horizon/creative_tab/<path>.json` — `{"icon": "ruby:ruby", "name": "Ruby"}` (`name` optional). The title localizes through the mod's lang files' `itemGroup.<mod id>.<path>`, else the English `name`, else the prettified path. Vanilla has no free tab slot (both rows are full: categories, hotbar, search, inventory), so the game wraps the mods' tabs onto rows above vanilla's, 5 left-aligned columns a row, reusing vanilla's tab sprites 1–5: the vanilla look, no new art. 3. **Plumbing**: the overlay's build collects the additions into `creative-mods.json` (tab id → plain stacks; the mod's tabs carry icon and title), and `Creative::load` merges it over the vanilla export. With no mods the root is the base root and nothing changes — the creative parity harness covers that path. 4. **Fences**: a `tab` outside vanilla's ten categories or the mod's declared tabs, a `tab` on a block without `item: true`, and a tab icon that is neither vanilla nor the mod's own are refused at load, like the registries' other fences. 5. **The mods' item panel on the creative screen**: `browser` now shows beside the creative screen as it does beside inventory and containers (`container_image` already measured the creative window). A click on the panel is taken before the grid's, its search box takes keys when focused, and a mod's registered key (R/U) works over any slot or panel item there. The official Recipes mod needs no code change; its description now says so. Aware of #3149 (creative click syncing): the same screen, a different behaviour — no functional overlap beyond `click_creative`'s first lines; happy to rebase. Label: `feature` — players get content-mod items in the creative inventory and the recipe viewer on the creative screen. Not a fix. Fresh builds of this branch land on the fork first and may be ahead of what is PR'd here: https://github.com/I114rk/forkizon > Self-check (`python3 tools/pr_ready.py --quick`): was interrupted and is > running again — its block lands here (and in a comment) when it finishes. 🤖 Generated with [OpenCode](https://opencode.ai), [GLM](https://z.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:14 +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#4826
No description provided.