[GH-ISSUE #4916] Item renderer ignores minecraft:custom_model_data (tints and select both fall back) #1489

Closed
opened 2026-11-02 15:47:21 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Dawnforger on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4916

Originally assigned to: @k3yh on GitHub.

Version: Nightly 2026-10-30 1da354b (also v0.2.97) · OS: Nobara Linux 44 (kernel 7.2.6), AMD Ryzen 5 3600, AMD Radeon RX 9070 XT (RADV, Vulkan)

What I did: Loaded a small content mod (--dev-mod) whose item definition reads minecraft:custom_model_data, then gave myself items that set it.

What happened: Every item renders as if it had no custom_model_data. custom_model_data tints always use their default, and a minecraft:select on custom_model_data always picks its fallback. /data get entity @s SelectedItem shows the component on the stack:
{components: {"minecraft:custom_model_data": {colors: [4910553, 9398842, 14211288]}}, count: 1, id: "workbench_wonders:test_pickaxe"}

What I expected: As in vanilla 26.3, the tint uses colors[index] and the select picks the case matching strings[index].

Steps to reproduce (tints):

  1. Item definition assets/<ns>/items/test_pickaxe.json:
    { "model": { "type": "minecraft:model", "model": "<ns>:item/test_pickaxe",
      "tints": [
        { "type": "minecraft:custom_model_data", "index": 1, "default": 9398842 },
        { "type": "minecraft:custom_model_data", "index": 2, "default": 9398842 },
        { "type": "minecraft:custom_model_data", "index": 0, "default": 14211288 } ] } }
    
    The model is minecraft:item/handheld with three grayscale layers.
  2. /give @s <ns>:test_pickaxe[custom_model_data={colors:[16711680,65280,255]}]
  3. The item renders with the default colors (brown and gray), not red, green and blue. Int and float-triple colors behave the same.

Steps to reproduce (select):

  1. Item definition: a minecraft:composite of three minecraft:selects with "property": "minecraft:custom_model_data", "index" 0, 1 and 2. Each has cases for "wood", "stone", "iron", "gold" and "diamond", and a fallback.
  2. /give @s <ns>:test_pickaxe[custom_model_data={strings:["diamond","wood","gold"]}]
  3. Every layer shows its fallback model, in the hotbar and in first person.

The composite, select and constant/default tints themselves work. Only the per-stack component never reaches the resolver. On main, TintSource::CustomModelData/SelectProperty::CustomModelData in horizon-assets/src/item_model.rs and the CustomModelData branch of item_sync.rs look correct. So the component seems to be lost before item_render::stack_view builds the patch (single player / integrated server; not checked on a dedicated server).

Possibly related: #4867 (composite + condition on minecraft:component → invisible item).

Found while testing a content mod through the launcher's agent control (horizon-launcher mcp); screenshots available.

Originally created by @Dawnforger on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4916 Originally assigned to: @k3yh on GitHub. **Version:** Nightly 2026-10-30 1da354b (also v0.2.97) · **OS:** Nobara Linux 44 (kernel 7.2.6), AMD Ryzen 5 3600, AMD Radeon RX 9070 XT (RADV, Vulkan) > What I did: Loaded a small content mod (`--dev-mod`) whose item definition reads `minecraft:custom_model_data`, then gave myself items that set it. > > What happened: Every item renders as if it had no `custom_model_data`. `custom_model_data` tints always use their `default`, and a `minecraft:select` on `custom_model_data` always picks its `fallback`. `/data get entity @s SelectedItem` shows the component on the stack: > `{components: {"minecraft:custom_model_data": {colors: [4910553, 9398842, 14211288]}}, count: 1, id: "workbench_wonders:test_pickaxe"}` > > What I expected: As in vanilla 26.3, the tint uses `colors[index]` and the select picks the case matching `strings[index]`. **Steps to reproduce (tints):** 1. Item definition `assets/<ns>/items/test_pickaxe.json`: ```json { "model": { "type": "minecraft:model", "model": "<ns>:item/test_pickaxe", "tints": [ { "type": "minecraft:custom_model_data", "index": 1, "default": 9398842 }, { "type": "minecraft:custom_model_data", "index": 2, "default": 9398842 }, { "type": "minecraft:custom_model_data", "index": 0, "default": 14211288 } ] } } ``` The model is `minecraft:item/handheld` with three grayscale layers. 2. `/give @s <ns>:test_pickaxe[custom_model_data={colors:[16711680,65280,255]}]` 3. The item renders with the default colors (brown and gray), not red, green and blue. Int and float-triple colors behave the same. **Steps to reproduce (select):** 1. Item definition: a `minecraft:composite` of three `minecraft:select`s with `"property": "minecraft:custom_model_data"`, `"index"` 0, 1 and 2. Each has cases for `"wood"`, `"stone"`, `"iron"`, `"gold"` and `"diamond"`, and a `fallback`. 2. `/give @s <ns>:test_pickaxe[custom_model_data={strings:["diamond","wood","gold"]}]` 3. Every layer shows its `fallback` model, in the hotbar and in first person. The `composite`, `select` and constant/default tints themselves work. Only the per-stack component never reaches the resolver. On `main`, `TintSource::CustomModelData`/`SelectProperty::CustomModelData` in `horizon-assets/src/item_model.rs` and the `CustomModelData` branch of `item_sync.rs` look correct. So the component seems to be lost before `item_render::stack_view` builds the patch (single player / integrated server; not checked on a dedicated server). Possibly related: #4867 (composite + condition on `minecraft:component` → invisible item). Found while testing a content mod through the launcher's agent control (`horizon-launcher mcp`); screenshots available.
Author
Owner

@k3yh commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6538171038 --> @k3yh commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
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#1489
No description provided.