Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-279504

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 25w04a
    • 25w03a
    • None
    • Community Consensus
    • Resource Packs
    • Normal
    • Platform

      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}

       

            boq [Mojang] Bartosz Bok
            JoeFly JoeFly
            Votes:
            15 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: