mojira.dev
MC-308406

Item models are shown incorrectly in the smithing table menu's armor stand

If the item result of a "smithing_trim" or "smithing_transform" recipe has components that, with a “select” condition from a model definition, are supposed to change its model, the item result held by the armour stand in the interface does not show the model change. This appears to happen only with components related to dynamic registries, such as "minecraft:enchantments" and "minecraft:trim".

Steps to reproduce

This example is for the “minecraft:trim” component, but the issue would still happen if the “minecraft:enchaments” component was used instead:

  1. Download the example data pack attached below that adds trims for netherite swords (Unfortunately I attached it with the wrong recipe files, to reproduce this bug correctly, replace the recipe files there with a single recipe containing the smithing trim snipet bellow)

  2. Load it both as a data pack and as a resource pack

  3. Search for "Linear" in the creative menu and grab the tool trim smithing template that appears

  4. Use the template to trim a netherite sword with any material, similarly to how armour is trimmed

Expected Result: Both the netherite sword in result slot and in the armour stand of the interface appear trimmed.

Actual Result: Only the netherite sword in the result slot appears trimmed.

Some of the custom files used for this example

Smithing trim recipe

{
  "type": "minecraft:smithing_trim",
  "addition": "#minecraft:trim_materials",
  "base": "minecraft:netherite_sword",
  "pattern": "tooltrims:linear",
  "template": "minecraft:tadpole_spawn_egg"
}

Item model definition

{
  "model": {
    "type": "minecraft:select",
    "fallback": {
      "type": "minecraft:model",
      "model": "minecraft:item/netherite_sword"
    },
    "property": "minecraft:component",
    "component": "minecraft:trim",
    "cases": [
      { "model": { "type": "model", "model": "tooltrims:trims/netherite_sword_linear_amethyst" }, "when": { "pattern":"tooltrims:linear", "material": "amethyst" } },
      ...
    ]
  }
}

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media][media][media]

JoeFly

gegy

Confirmed

Platform HC

Normal

Items, Rendering

26.1.2

26.3 Snapshot 5

Retrieved