[PR #24] [MERGED] Recipes as a native mod (native/recipes, hook points v2) #31

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon-mods/pull/24
Author: @ludovic111
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @ludovic111

Base: main ← Head: feat/native-recipes


📝 Commits (2)

  • 0cc7ca5 Recipes as a native mod (native/recipes, hooks 2)
  • f0837f1 Native mods: pin all five to Horizon 8f91683 (hook points v2)

📊 Changes

22 files changed (+1160 additions, -8 deletions)

View changed files

📝 native/fps-overlay/compatibility.json (+1 -1)
📝 native/fps-overlay/mixins/fps_overlay/horizon-mixin.toml (+1 -1)
📝 native/keystrokes/compatibility.json (+1 -1)
📝 native/keystrokes/mixins/keystrokes/horizon-mixin.toml (+1 -1)
📝 native/minimap/compatibility.json (+1 -1)
📝 native/minimap/mixins/minimap/horizon-mixin.toml (+1 -1)
➕ native/recipes/Cargo.lock (+7 -0)
➕ native/recipes/Cargo.toml (+11 -0)
➕ native/recipes/LICENSE (+21 -0)
➕ native/recipes/README.md (+51 -0)
➕ native/recipes/compatibility.json (+8 -0)
➕ native/recipes/mixins/recipes/click.rs (+10 -0)
➕ native/recipes/mixins/recipes/event.rs (+12 -0)
➕ native/recipes/mixins/recipes/frame.rs (+4 -0)
➕ native/recipes/mixins/recipes/glue.rs (+194 -0)
➕ native/recipes/mixins/recipes/horizon-mixin.toml (+72 -0)
➕ native/recipes/mixins/recipes/list.rs (+10 -0)
➕ native/recipes/mixins/recipes/runtime.rs (+669 -0)
➕ native/recipes/mixins/recipes/settings.rs (+12 -0)
➕ native/recipes/proof.py (+71 -0)

...and 2 more files

📄 Description

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

Horizon's official Recipes viewer as a native mod, native/recipes/, next to Zoom, FPS Counter, Keystrokes and Minimap. It's ported from the WebAssembly Recipes 1.0.0 with the same behaviour:

  • the item panel beside container screens, with a search box (#tag, @namespace);
  • R shows an item's recipes and U its uses, one tab per station;
    • fills the crafting grid with a recipe the player knows;
  • in creative mode, "Click gives items".

Players keep their settings: the same file (horizon-mods/.horizon-mod-data/recipes/give) and keys (key.recipes.recipe, key.recipes.uses). It rests when turned off in Options > Mods.

  • It needs hook points v2 ("hooks": 2): the item panel and the recipe tables, horizon-rust/horizon#3434 and #3435. Both are merged. All five native mods now pin 8f91683 (main after #3435), so they build together without --horizon. The pin moves to a Nightly's commit when the registry switches the official entries to native-mod.
  • runtime.rs is the viewer and the crate's library, with 5 tests. glue.rs is a second module that converts the game's tables and panel events. There is one helper per hook.
  • No registry change here: mods/recipes.toml turns native-mod in the registry-switch PR, with the other four.

Checks (Mac mini, on 8f91683)

  • cargo test (5 passed), cargo fmt --check, cargo clippy --all-targets -- -D warnings.
  • cargo test for all five mods: ok.
  • native.py check all on 8f91683, the five native mods together: ok.
  • native.py package recipes: 9 files, .rs and .toml only.
  • native.py proof recipes --resources … (fresh data folders, horizon-ctl --offscreen):
{
  "proof": "recipes",
  "ok": true,
  "given": { "minecraft:stone": 1 },
  "give_file_after_click": "false",
  "diff_panel": 39.0,
  "diff_panel_first_shot": 23.4
}

The proof checks that the settings page reads the seeded WebAssembly setting, and that the panel shows beside a crafting table. A click in creative mode gives Stone. With the setting turned off, the same click opens "Recipes: Stone". The creative inventory shows no panel, as with the WebAssembly mod, so the proof opens a crafting table.

🤖 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-mods/pull/24 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/native-recipes` --- ### 📝 Commits (2) - [`0cc7ca5`](https://github.com/horizon-rust/horizon-mods/commit/0cc7ca56bfeacf04b4d446af80c96a94d20e77f4) Recipes as a native mod (native/recipes, hooks 2) - [`f0837f1`](https://github.com/horizon-rust/horizon-mods/commit/f0837f16de86419277de5123a741b3806e439c96) Native mods: pin all five to Horizon 8f91683 (hook points v2) ### 📊 Changes **22 files changed** (+1160 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `native/fps-overlay/compatibility.json` (+1 -1) 📝 `native/fps-overlay/mixins/fps_overlay/horizon-mixin.toml` (+1 -1) 📝 `native/keystrokes/compatibility.json` (+1 -1) 📝 `native/keystrokes/mixins/keystrokes/horizon-mixin.toml` (+1 -1) 📝 `native/minimap/compatibility.json` (+1 -1) 📝 `native/minimap/mixins/minimap/horizon-mixin.toml` (+1 -1) ➕ `native/recipes/Cargo.lock` (+7 -0) ➕ `native/recipes/Cargo.toml` (+11 -0) ➕ `native/recipes/LICENSE` (+21 -0) ➕ `native/recipes/README.md` (+51 -0) ➕ `native/recipes/compatibility.json` (+8 -0) ➕ `native/recipes/mixins/recipes/click.rs` (+10 -0) ➕ `native/recipes/mixins/recipes/event.rs` (+12 -0) ➕ `native/recipes/mixins/recipes/frame.rs` (+4 -0) ➕ `native/recipes/mixins/recipes/glue.rs` (+194 -0) ➕ `native/recipes/mixins/recipes/horizon-mixin.toml` (+72 -0) ➕ `native/recipes/mixins/recipes/list.rs` (+10 -0) ➕ `native/recipes/mixins/recipes/runtime.rs` (+669 -0) ➕ `native/recipes/mixins/recipes/settings.rs` (+12 -0) ➕ `native/recipes/proof.py` (+71 -0) _...and 2 more files_ </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Horizon's official Recipes viewer as a native mod, `native/recipes/`, next to Zoom, FPS Counter, Keystrokes and Minimap. It's ported from the WebAssembly Recipes 1.0.0 with the same behaviour: - the item panel beside container screens, with a search box (`#tag`, `@namespace`); - R shows an item's recipes and U its uses, one tab per station; - + fills the crafting grid with a recipe the player knows; - in creative mode, "Click gives items". Players keep their settings: the same file (`horizon-mods/.horizon-mod-data/recipes/give`) and keys (`key.recipes.recipe`, `key.recipes.uses`). It rests when turned off in Options > Mods. - It needs hook points v2 (`"hooks": 2`): the item panel and the recipe tables, horizon-rust/horizon#3434 and #3435. Both are merged. All five native mods now pin `8f91683` (main after #3435), so they build together without `--horizon`. The pin moves to a Nightly's commit when the registry switches the official entries to `native-mod`. - `runtime.rs` is the viewer and the crate's library, with 5 tests. `glue.rs` is a second module that converts the game's tables and panel events. There is one helper per hook. - No registry change here: `mods/recipes.toml` turns `native-mod` in the registry-switch PR, with the other four. ## Checks (Mac mini, on 8f91683) - `cargo test` (5 passed), `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`. - `cargo test` for all five mods: ok. - `native.py check all` on 8f91683, the five native mods together: ok. - `native.py package recipes`: 9 files, `.rs` and `.toml` only. - `native.py proof recipes --resources …` (fresh data folders, `horizon-ctl --offscreen`): ```json { "proof": "recipes", "ok": true, "given": { "minecraft:stone": 1 }, "give_file_after_click": "false", "diff_panel": 39.0, "diff_panel_first_shot": 23.4 } ``` The proof checks that the settings page reads the seeded WebAssembly setting, and that the panel shows beside a crafting table. A click in creative mode gives Stone. With the setting turned off, the same click opens "Recipes: Stone". The creative inventory shows no panel, as with the WebAssembly mod, so the proof opens a crafting table. 🤖 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:02:41 +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-mods#31
No description provided.