Mojira Archive
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}

 

Fixed

JoeFly

[Mojang] Bartosz Bok

2025-01-15, 04:58 PM

2025-01-22, 11:50 AM

2025-01-22, 11:50 AM

15

11

Community Consensus

Normal

Platform

Resource Packs

25w03a

25w04a