mojira.dev
MC-279504

"minecraft:enchantments" component does not work on the select property of Item Models

In the newest snapshot, the "minecraft:component" select property was introduced on item models. It is able to detect components on items, but not "minecraft:enchantments".

How to reproduce

  1. Download the resource pack "item_model_bug_report" in attachements.

  2. Open/Create a world.

  3. Drag and drop the resource pack downloaded in the Resource Packs window.

  4. Run the command: 

    /give @s minecraft:wooden_sword[minecraft:enchantments={levels:{"minecraft:sharpness":1}}]

Expected result

The wooden sword given by the command should have the "minecraft:item/apple" model, as the enchantment condition of the item model is met.

Observed result

The wooden sword given by the command appears as a missing model with the Minecraft Launcher log error:

Couldn't parse item model 'minecraft:wooden_sword' from pack 'file/item_model_bug_report.zip': Can't access registry ResourceKey[minecraft:root / minecraft:enchantment] missed input: {"minecraft:sharpness":1}

 

Attachments

Comments 2

Can confirm, same result

JoeFly

boq

Community Consensus

Platform

Normal

Resource Packs

25w03a

25w04a

Retrieved