[PR #2446] [MERGED] Official mod: Recipes, a recipe viewer (search, R/U, station tabs, fill, creative give) #4324

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

📋 Pull Request Information

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

Base: main ← Head: feat/official-recipes-mod


📝 Commits (2)

  • d241c54 Official mod: Recipes, a recipe viewer
  • 92e3f49 Merge branch 'feat/mod-recipe-actions' into feat/official-recipes-mod

📊 Changes

6 files changed (+400 additions, -3 deletions)

View changed files

📝 Cargo.lock (+7 -0)
📝 Cargo.toml (+1 -1)
📝 docs/mods.md (+3 -2)
➕ mods/official/recipes/Cargo.toml (+16 -0)
➕ mods/official/recipes/horizon-mod.toml (+9 -0)
➕ mods/official/recipes/src/lib.rs (+364 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Part D of the recipe-viewer plan: Horizon's own recipe viewer, as an official mod (mods/official/recipes). It uses only the public API: recipes (#2284, #2318) and browser (#2300, #2305), drawn by the game (#2301, #2306). Stacked on #2318. It is written from vanilla 26.3's recipe book and screens and docs/design-system.md, without looking at any other recipe viewer. Players get nothing until they install it from the registry: it ships there, not in the game.

What players get once they install it

  • Every item in the item panel beside the inventory and container screens, with the panel's search box:
    • words match the name (in the player's language) or the id;
    • @minecraft keeps a namespace, #logs a tag.
  • Recipes and uses.
    • R over an item, or a click on it, shows its recipes. U, or a right click, shows its uses.
    • R and U work over the panel's items, any slot, and the stacks of a recipe page. They are the mod's keys, so they can be rebound in Controls.
  • Recipe pages.
    • One tab per station that has recipes: crafting table, furnace, blast furnace, smoker, campfire, stonecutter, smithing table, brewing stand.
    • Shapeless crafting says so. Cooking shows its time and experience.
    • A click on any stack of a recipe opens that stack's recipes (its uses with a right click).
    • Back returns through the pages, then to the items.
  • + fills the grid. It sits beside each crafting recipe. It is greyed until the player's recipe book holds that recipe, and a click places the recipe as the book does (recipes.place, one craft).
  • Creative give. The mod's settings page has "Click gives items (creative)", off by default. With it on, in creative mode, a click on a panel item gives one and a right click gives a stack, as vanilla's creative inventory does with a click and with Shift. Outside creative, the click shows recipes as usual.
  • On servers that are not Horizon, it shows the game's own 26.3 recipes. Which ones are known, and what + can fill, follow the server's recipe book. The mod's description says so.

For this, #2318 gained one commit: recipes.give now cuts the count to one stack of the item (64, 16 or 1), so a mod can ask for a stack without knowing its size.

Checks

pr_ready (tools/pr_ready.py --quick --base feat/mod-recipe-actions on ludovics-mac-mini, against feat/mod-recipe-actions at b28b49913, 16 min 4 s)

Check Result
Scope ✅ 6 files, +400 −3
Cargo.lock ✅ changes with a Cargo.toml
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (8 s)
clippy ✅ (1 min 30 s)
tests: workspace ✅ 1653 passed: horizon-prepare's source-digest test failed once because the shared target dir held another worktree's build.rs output; with build.rs touched, its 38 tests pass (12 min 15 s)
doc tests ✅ 2 passed (2 min 10 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 340 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 328 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)
  • E2E (scratch driver, horizon-ctl, the built recipes.hmod as a dev mod): 61 of 63 checks pass across in-frame, server thread, LAN guest (host in-frame), LAN guest (host on its server thread) and a dedicated server's guest. The two that fail are the creative-give checks in the second LAN mode (see "Not covered"). The checks:
    • every item in the panel;
    • "oak planks" in the search box keeps Oak Planks;
    • a click shows its recipes in survival, with a Crafting Table tab and the oak log;
      • is enabled for the known recipe, and a click fills the 2x2 grid (planks in the result);
    • U over the oak logs in the hotbar shows their uses with a Furnace tab, and that tab shows charcoal;
    • Back returns to the planks, then to the items;
    • in creative on a crafting table, a click gives 1 plank and a right click a stack (65 in all);
    • no panic and no stopped mod.
  • Not covered: a LAN guest whose host runs its server thread doesn't open a crafting table at all, even with no mod loaded (interact on it leaves the screen on playing). So that mode's creative-give checks can't run. That bug is the game's and is not touched here; the give path itself passes in the four other modes.
  • cargo horizon-mod check: needs mod API level 6, trial run ok.

🤖 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/2446 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/official-recipes-mod` --- ### 📝 Commits (2) - [`d241c54`](https://github.com/horizon-rust/horizon/commit/d241c54e059bbb9274f8e2c1b2a1db6e3f62e815) Official mod: Recipes, a recipe viewer - [`92e3f49`](https://github.com/horizon-rust/horizon/commit/92e3f496f0fe7f9c44190f0b8fa39b14d3500f7c) Merge branch 'feat/mod-recipe-actions' into feat/official-recipes-mod ### 📊 Changes **6 files changed** (+400 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+7 -0) 📝 `Cargo.toml` (+1 -1) 📝 `docs/mods.md` (+3 -2) ➕ `mods/official/recipes/Cargo.toml` (+16 -0) ➕ `mods/official/recipes/horizon-mod.toml` (+9 -0) ➕ `mods/official/recipes/src/lib.rs` (+364 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Part D of the recipe-viewer plan: Horizon's own recipe viewer, as an official mod (`mods/official/recipes`). It uses only the public API: `recipes` (#2284, #2318) and `browser` (#2300, #2305), drawn by the game (#2301, #2306). Stacked on #2318. It is written from vanilla 26.3's recipe book and screens and docs/design-system.md, without looking at any other recipe viewer. Players get nothing until they install it from the registry: it ships there, not in the game. ## What players get once they install it - **Every item** in the item panel beside the inventory and container screens, with the panel's search box: - words match the name (in the player's language) or the id; - `@minecraft` keeps a namespace, `#logs` a tag. - **Recipes and uses.** - R over an item, or a click on it, shows its recipes. U, or a right click, shows its uses. - R and U work over the panel's items, any slot, and the stacks of a recipe page. They are the mod's keys, so they can be rebound in Controls. - **Recipe pages.** - One tab per station that has recipes: crafting table, furnace, blast furnace, smoker, campfire, stonecutter, smithing table, brewing stand. - Shapeless crafting says so. Cooking shows its time and experience. - A click on any stack of a recipe opens that stack's recipes (its uses with a right click). - Back returns through the pages, then to the items. - **+ fills the grid.** It sits beside each crafting recipe. It is greyed until the player's recipe book holds that recipe, and a click places the recipe as the book does (`recipes.place`, one craft). - **Creative give.** The mod's settings page has "Click gives items (creative)", off by default. With it on, in creative mode, a click on a panel item gives one and a right click gives a stack, as vanilla's creative inventory does with a click and with Shift. Outside creative, the click shows recipes as usual. - **On servers that are not Horizon**, it shows the game's own 26.3 recipes. Which ones are known, and what + can fill, follow the server's recipe book. The mod's description says so. For this, #2318 gained one commit: `recipes.give` now cuts the count to one stack of the item (64, 16 or 1), so a mod can ask for a stack without knowing its size. ## Checks **pr_ready** (`tools/pr_ready.py --quick --base feat/mod-recipe-actions` on ludovics-mac-mini, against feat/mod-recipe-actions at b28b49913, 16 min 4 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +400 −3 | | Cargo.lock | ✅ changes with a Cargo.toml | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (8 s) | | clippy | ✅ (1 min 30 s) | | tests: workspace | ✅ 1653 passed: `horizon-prepare`'s source-digest test failed once because the shared target dir held another worktree's build.rs output; with `build.rs` touched, its 38 tests pass (12 min 15 s) | | doc tests | ✅ 2 passed (2 min 10 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 340 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 328 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | - **E2E** (scratch driver, `horizon-ctl`, the built `recipes.hmod` as a dev mod): 61 of 63 checks pass across in-frame, server thread, LAN guest (host in-frame), LAN guest (host on its server thread) and a dedicated server's guest. The two that fail are the creative-give checks in the second LAN mode (see "Not covered"). The checks: - every item in the panel; - "oak planks" in the search box keeps Oak Planks; - a click shows its recipes in survival, with a Crafting Table tab and the oak log; - + is enabled for the known recipe, and a click fills the 2x2 grid (planks in the result); - U over the oak logs in the hotbar shows their uses with a Furnace tab, and that tab shows charcoal; - Back returns to the planks, then to the items; - in creative on a crafting table, a click gives 1 plank and a right click a stack (65 in all); - no panic and no stopped mod. - **Not covered:** a LAN guest whose host runs its server thread doesn't open a crafting table at all, even with no mod loaded (`interact` on it leaves the screen on playing). So that mode's creative-give checks can't run. That bug is the game's and is not touched here; the give path itself passes in the four other modes. - `cargo horizon-mod check`: needs mod API level 6, trial run ok. 🤖 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 04:16:20 +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#4324
No description provided.