[PR #3745] [MERGED] Port pack: item models only an item's overrides use are not items #5189

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3745
Author: @UMCEKO
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @levzzz5154

Base: main ← Head: mods/port-no-phantom-items


📝 Commits (6)

  • 21ec14c Port pack: armour of a mod's own material draws its own textures
  • 9765a03 Port pack: item models only an item's overrides use are not items
  • e73e31c Merge main into mods/port-armor-equipment
  • 98ecd84 Port pack: armour names only an equipment asset that exists
  • 99050f7 Merge mods/port-armor-equipment into mods/port-no-phantom-items
  • ce208ca Port pack: an override's target is a look only if no item needs it

📊 Changes

6 files changed (+424 additions, -17 deletions)

View changed files

📝 crates/horizon-client/examples/mod_port_probe.rs (+21 -0)
📝 crates/horizon-port-pack/src/carry.rs (+177 -3)
📝 crates/horizon-port-pack/src/oracle.rs (+173 -6)
📝 crates/horizon-port-pack/src/pipeline.rs (+29 -1)
📝 docs/modpacks.md (+6 -1)
📝 tools/mod_port_harness.py (+18 -6)

📄 Description

🤖 Opened by UMCEKO's AI agent (Claude Code, Claude Opus 5.5), not by UMCEKO personally.

Stack, part 7 of 7. #3739 to #3743 have merged. This PR contains #3744, so please merge that one first; this PR's own change is the commits after it.

What and why

Without the oracle (horizon-port-pack check, which the launcher's mod browser runs), every models/item file became an item. 1.21.1's armour-trim looks, which the armour's own model switches to through overrides, therefore came over as 40 items of their own: Simplest Emerald Gear declared 49 items where NeoForge registers 9. A model that another item model's overrides names is a variant of that item now, and gets neither a declaration nor an item definition. A bow's pulling models are the same case.

check on the jar: Works. 49 items becomes Works. 9 items.

Still open, and not fixed here: without the oracle, tools keep the stick template, so the browser's "Works" overstates tool mods.

Vanilla reference

1.21.1's ItemOverrides (item models switching on predicates such as trim_type).

Review fixes

From dimaniojk's agent's review (commit ce208cac3):

  • Only overrides into the mod's own namespace count; a target with no namespace is vanilla's, so it counts for nothing.
  • An item the oracle says is registered is never dropped.
  • Models that only reach each other stay items. A chain from a base model (gem → glow → bright) still makes looks of both.
  • Tested with a carry over a jar holding each case, with and without oracle facts. The test fails if the registered-item check is removed.

Self-check

pr_ready (tools/pr_ready.py --quick on nixos, against origin/main at 6307b54de, 8 min 6 s)

Check Result
Scope ✅ 6 files, +424 −17
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (28 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 32 s)
tests: horizon-client, horizon-port-pack ✅ 1253 passed (4 min 51 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (20 s)
launcher clippy ✅ (15 s)
launcher tests ✅ 300 passed (32 s)
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Tools used

  • headless-computer-mcp (UMCEKO's): runs the game in a private headless Wayland compositor and drives it with a real mouse and keyboard; every screenshot in this stack was taken with it, including the hovered tooltips.
  • tools/neoforge_oracle.py: the real mod jar on NeoForge 21.1.259, the ground truth (extended in this stack to export item components).
  • horizon-port-pack carry with --resources, then tools/mod_port_harness.py with examples/mod_port_probe.rs (extended in this stack to compare item stats and worn armour).
  • horizon-ctl against the real game: /give, /item replace, /attribute and a hit on a NoAI pig.
  • tools/pr_ready.py --quick, run against main. The block's scope includes #3744.

The test mod is Simplest Emerald Gear 1.0.6 for NeoForge 1.21.1 (MIT): 9 items, no dependencies. Its jar, the oracle facts and the carry stayed on the local machine, outside the repository.

🤖 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/3745 **Author:** [@UMCEKO](https://github.com/UMCEKO) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `mods/port-no-phantom-items` --- ### 📝 Commits (6) - [`21ec14c`](https://github.com/horizon-rust/horizon/commit/21ec14c0b2e450a013024376cf41f4f4c7f1d479) Port pack: armour of a mod's own material draws its own textures - [`9765a03`](https://github.com/horizon-rust/horizon/commit/9765a0341ddddfe5f5b078469d27aaff8b5bf793) Port pack: item models only an item's overrides use are not items - [`e73e31c`](https://github.com/horizon-rust/horizon/commit/e73e31c7091ad78b3064082f61c3e8ccc1036fad) Merge main into mods/port-armor-equipment - [`98ecd84`](https://github.com/horizon-rust/horizon/commit/98ecd84b54636b0a9de0bd5b61442747a64b4f2d) Port pack: armour names only an equipment asset that exists - [`99050f7`](https://github.com/horizon-rust/horizon/commit/99050f7ac2ab76467bc60636fe4f761f47243d96) Merge mods/port-armor-equipment into mods/port-no-phantom-items - [`ce208ca`](https://github.com/horizon-rust/horizon/commit/ce208cac3a11aaa19fd3e820ba8c7e18eda5d384) Port pack: an override's target is a look only if no item needs it ### 📊 Changes **6 files changed** (+424 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/mod_port_probe.rs` (+21 -0) 📝 `crates/horizon-port-pack/src/carry.rs` (+177 -3) 📝 `crates/horizon-port-pack/src/oracle.rs` (+173 -6) 📝 `crates/horizon-port-pack/src/pipeline.rs` (+29 -1) 📝 `docs/modpacks.md` (+6 -1) 📝 `tools/mod_port_harness.py` (+18 -6) </details> ### 📄 Description > 🤖 Opened by UMCEKO's AI agent (Claude Code, Claude Opus 5.5), not by UMCEKO personally. **Stack, part 7 of 7.** #3739 to #3743 have merged. This PR contains #3744, so please merge that one first; this PR's own change is the commits after it. ## What and why Without the oracle (`horizon-port-pack check`, which the launcher's mod browser runs), every `models/item` file became an item. 1.21.1's armour-trim looks, which the armour's own model switches to through `overrides`, therefore came over as 40 items of their own: Simplest Emerald Gear declared 49 items where NeoForge registers 9. A model that another item model's `overrides` names is a variant of that item now, and gets neither a declaration nor an item definition. A bow's pulling models are the same case. `check` on the jar: `Works. 49 items` becomes `Works. 9 items`. Still open, and not fixed here: without the oracle, tools keep the stick template, so the browser's "Works" overstates tool mods. ## Vanilla reference 1.21.1's `ItemOverrides` (item models switching on predicates such as `trim_type`). ## Review fixes From `dimaniojk`'s agent's review (commit `ce208cac3`): - Only overrides into the mod's own namespace count; a target with no namespace is vanilla's, so it counts for nothing. - An item the oracle says is registered is never dropped. - Models that only reach each other stay items. A chain from a base model (`gem` → `glow` → `bright`) still makes looks of both. - Tested with a carry over a jar holding each case, with and without oracle facts. The test fails if the registered-item check is removed. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on nixos, against origin/main at 6307b54de, 8 min 6 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +424 −17 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (28 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 32 s) | | tests: horizon-client, horizon-port-pack | ✅ 1253 passed (4 min 51 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (20 s) | | launcher clippy | ✅ (15 s) | | launcher tests | ✅ 300 passed (32 s) | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | ## Tools used - [headless-computer-mcp](https://github.com/UMCEKO/headless-computer-mcp) (UMCEKO's): runs the game in a private headless Wayland compositor and drives it with a real mouse and keyboard; every screenshot in this stack was taken with it, including the hovered tooltips. - `tools/neoforge_oracle.py`: the real mod jar on NeoForge 21.1.259, the ground truth (extended in this stack to export item components). - `horizon-port-pack carry` with `--resources`, then `tools/mod_port_harness.py` with `examples/mod_port_probe.rs` (extended in this stack to compare item stats and worn armour). - `horizon-ctl` against the real game: `/give`, `/item replace`, `/attribute` and a hit on a NoAI pig. - `tools/pr_ready.py --quick`, run against `main`. The block's scope includes #3744. The test mod is [Simplest Emerald Gear](https://modrinth.com/mod/simplest-emerald-gear) 1.0.6 for NeoForge 1.21.1 (MIT): 9 items, no dependencies. Its jar, the oracle facts and the carry stayed on the local machine, outside the repository. 🤖 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 05:10:50 +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#5189
No description provided.