[PR #7509] [MERGED] Item models: mods' own types fall back to vanilla's behaviour #7634

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7509
Author: @UMCEKO
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: item-models/mod-type-fallbacks


📝 Commits (1)

  • 68c6f12 Item models: mods' own types fall back to vanilla's behaviour

📊 Changes

6 files changed (+351 additions, -7 deletions)

View changed files

📝 crates/horizon-assets/src/item_model.rs (+35 -0)
➕ crates/horizon-assets/src/item_model/foreign.rs (+114 -0)
➕ crates/horizon-assets/src/item_model/foreign_tests.rs (+174 -0)
📝 crates/horizon-assets/src/item_model/special.rs (+7 -0)
📝 crates/horizon-assets/src/item_model/tests.rs (+10 -0)
📝 crates/horizon-client/src/item_render.rs (+11 -7)

📄 Description

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

An item definition that uses a node type, property, special model or tint source from another namespace failed to decode, and the item drew the missing model without a log line. It now decodes to the closest vanilla behaviour, and a definition that still fails to load is logged. Carrying Mekanism, MekanismTools, Mekanism Generators and AE2 left 76 items drawing the missing model; with this, 1,188 of their 1,191 definitions load (the other 3 fail on an unknown data component, a separate gap).

Vanilla minecraft: names still fail as before; only other namespaces fall back.

Closes #7490

What each case becomes:

  • Unknown node type: its nested node (model, base_model, base or fallback), else its model id, else empty. A fluid container type draws its base (and unmasked cover) texture, without the fluid.
  • Condition on a mod's property: on_false.
  • Select on a mod's property: its fallback, else empty.
  • Range dispatch on a mod's property: the value is 0.
  • Special with a mod's model type: its base model.
  • Tint source from a mod: untinted.

Once #7488 lets a native mod register its own property or special model, foreign::is_foreign is the one place to ask that registry first.

pr_ready (tools/pr_ready.py --quick, against origin/main at b09827e93; rebased onto 43d532289 since, cargo test -p horizon-assets and clippy rerun clean)

Check Result
Scope ✅ 6 files, +351 −7
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed
rustfmt ✅
clippy ✅
tests: horizon-assets, horizon-client-lib ✅ 1491 passed
doc tests ✅ 0 passed
content root tests ✅ 24 passed (--test-threads=2; the default thread count ran out of memory here)
Parity ➖ 360 affected, to run in CI (--quick)
Label none (fix)

🤖 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/7509 **Author:** [@UMCEKO](https://github.com/UMCEKO) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `item-models/mod-type-fallbacks` --- ### 📝 Commits (1) - [`68c6f12`](https://github.com/horizon-rust/horizon/commit/68c6f12e92273e62a697e82011303bd9c677d46d) Item models: mods' own types fall back to vanilla's behaviour ### 📊 Changes **6 files changed** (+351 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-assets/src/item_model.rs` (+35 -0) ➕ `crates/horizon-assets/src/item_model/foreign.rs` (+114 -0) ➕ `crates/horizon-assets/src/item_model/foreign_tests.rs` (+174 -0) 📝 `crates/horizon-assets/src/item_model/special.rs` (+7 -0) 📝 `crates/horizon-assets/src/item_model/tests.rs` (+10 -0) 📝 `crates/horizon-client/src/item_render.rs` (+11 -7) </details> ### 📄 Description > 🤖 Opened by UMCEKO's AI agent (Claude Code, Claude Opus 5.5), not by UMCEKO personally. An item definition that uses a node type, property, special model or tint source from another namespace failed to decode, and the item drew the missing model without a log line. It now decodes to the closest vanilla behaviour, and a definition that still fails to load is logged. Carrying Mekanism, MekanismTools, Mekanism Generators and AE2 left 76 items drawing the missing model; with this, 1,188 of their 1,191 definitions load (the other 3 fail on an unknown data component, a separate gap). Vanilla `minecraft:` names still fail as before; only other namespaces fall back. Closes #7490 What each case becomes: - Unknown node type: its nested node (`model`, `base_model`, `base` or `fallback`), else its model id, else empty. A fluid container type draws its base (and unmasked cover) texture, without the fluid. - Condition on a mod's property: `on_false`. - Select on a mod's property: its `fallback`, else empty. - Range dispatch on a mod's property: the value is 0. - Special with a mod's model type: its `base` model. - Tint source from a mod: untinted. Once #7488 lets a native mod register its own property or special model, `foreign::is_foreign` is the one place to ask that registry first. **pr_ready** (`tools/pr_ready.py --quick`, against origin/main at b09827e93; rebased onto 43d532289 since, `cargo test -p horizon-assets` and clippy rerun clean) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +351 −7 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-assets, horizon-client-lib | ✅ 1491 passed | | doc tests | ✅ 0 passed | | content root tests | ✅ 24 passed (`--test-threads=2`; the default thread count ran out of memory here) | | Parity | ➖ 360 affected, to run in CI (--quick) | | Label | none (fix) | 🤖 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 07:21:08 +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#7634
No description provided.