[PR #3744] [MERGED] Port pack: armour of a mod's own material draws its own textures #5188

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/3744
Author: @UMCEKO
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @levzzz5154

Base: main ← Head: mods/port-armor-equipment


📝 Commits (3)

  • 21ec14c Port pack: armour of a mod's own material draws its own textures
  • e73e31c Merge main into mods/port-armor-equipment
  • 98ecd84 Port pack: armour names only an equipment asset that exists

📊 Changes

6 files changed (+278 additions, -15 deletions)

View changed files

📝 crates/horizon-client/examples/mod_port_probe.rs (+21 -0)
📝 crates/horizon-port-pack/src/carry.rs (+31 -1)
📝 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 6 of 7. #3739 to #3743 have merged, so this PR's own change is now all that's left. #3745 contains it: please merge this one first.

What and why

Ported armour took the iron template's equippable, so worn it drew as iron. Each armour material in the mod's namespaces now becomes a 26.3 equipment asset (assets/<ns>/equipment/<material>.json) built from its 1.21.1 layers. textures/models/armor/<name>_layer_1.png and _layer_2.png are copied to textures/entity/equipment/humanoid/ and humanoid_leggings/, overlays and dyeable layers included. The item's equippable names that asset and uses the material's equip sound (item.armor.equip_diamond for emerald, not iron's).

The harness now also checks that the textures Horizon resolves for worn armour are byte-identical to the jar's layers: Simplest Emerald Gear's item_stats goes to 72/72. Rendering needs #3743.

Vanilla reference

26.3's equipment asset format (EquipmentClientInfo) and Equippable. 1.21.1's ArmorMaterial.Layer.texture(boolean) names the source textures.

Review fixes

From dimaniojk's agent's review (commit 98ecd84b5):

  • Prepared resources without a readable items.json no longer stop the carry: it's logged, as a vanilla_blocks failure is, and items are patched without the game's tables.
  • Armour names only an equipment asset that exists: one carry writes, or one vanilla has. A material with neither (layers outside models/armor/, or a namespace the mod doesn't own, which the review didn't list) keeps the template's asset and reports a difference. Without the game's tables, its equippable isn't patched at all, so the template's stays whole.

Self-check

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

Check Result
Scope ✅ 6 files, +278 −15
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (33 s)
rustfmt ✅ (6 s)
clippy ✅ (1 s)
tests: horizon-client, horizon-port-pack ✅ 1251 passed (2 min 41 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (2 s)
launcher clippy ✅ (4 s)
launcher tests ✅ 300 passed (12 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)

Screenshots

Taken before this branch was merged with main and before the review fixes, which only touch the port tool. mod_port_harness.py reran on the final commit: item_stats 72/72.

before (#3742) after
before (main) after

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 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/3744 **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-armor-equipment` --- ### 📝 Commits (3) - [`21ec14c`](https://github.com/horizon-rust/horizon/commit/21ec14c0b2e450a013024376cf41f4f4c7f1d479) Port pack: armour of a mod's own material draws its own textures - [`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 ### 📊 Changes **6 files changed** (+278 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/mod_port_probe.rs` (+21 -0) 📝 `crates/horizon-port-pack/src/carry.rs` (+31 -1) 📝 `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 6 of 7.** #3739 to #3743 have merged, so this PR's own change is now all that's left. #3745 contains it: please merge this one first. ## What and why Ported armour took the iron template's `equippable`, so worn it drew as iron. Each armour material in the mod's namespaces now becomes a 26.3 equipment asset (`assets/<ns>/equipment/<material>.json`) built from its 1.21.1 layers. `textures/models/armor/<name>_layer_1.png` and `_layer_2.png` are copied to `textures/entity/equipment/humanoid/` and `humanoid_leggings/`, overlays and dyeable layers included. The item's `equippable` names that asset and uses the material's equip sound (`item.armor.equip_diamond` for emerald, not iron's). The harness now also checks that the textures Horizon resolves for worn armour are byte-identical to the jar's layers: Simplest Emerald Gear's `item_stats` goes to **72/72**. Rendering needs #3743. ## Vanilla reference 26.3's equipment asset format (`EquipmentClientInfo`) and `Equippable`. 1.21.1's `ArmorMaterial.Layer.texture(boolean)` names the source textures. ## Review fixes From `dimaniojk`'s agent's review (commit `98ecd84b5`): - Prepared resources without a readable `items.json` no longer stop the carry: it's logged, as a `vanilla_blocks` failure is, and items are patched without the game's tables. - Armour names only an equipment asset that exists: one carry writes, or one vanilla has. A material with neither (layers outside `models/armor/`, or a namespace the mod doesn't own, which the review didn't list) keeps the template's asset and reports a difference. Without the game's tables, its `equippable` isn't patched at all, so the template's stays whole. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on nixos, against origin/main at 6307b54de, 3 min 41 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +278 −15 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (33 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 s) | | tests: horizon-client, horizon-port-pack | ✅ 1251 passed (2 min 41 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (2 s) | | launcher clippy | ✅ (4 s) | | launcher tests | ✅ 300 passed (12 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) | ## Screenshots Taken before this branch was merged with `main` and before the review fixes, which only touch the port tool. `mod_port_harness.py` reran on the final commit: `item_stats` 72/72. | before (#3742) | after | |---|---| | ![](https://raw.githubusercontent.com/UMCEKO/horizon/pr-screenshots/pr4-worn.png) | ![](https://raw.githubusercontent.com/UMCEKO/horizon/pr-screenshots/after-worn.png) | | before (`main`) | after | |---|---| | ![](https://raw.githubusercontent.com/UMCEKO/horizon/pr-screenshots/main-inventory.png) | ![](https://raw.githubusercontent.com/UMCEKO/horizon/pr-screenshots/after-inventory.png) | ## 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 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#5188
No description provided.