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

Datapack enchanted books don't appear in the creative inventory depending on the supported_items field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 24w18a
    • None
    • Unconfirmed
    • (Unassigned)

      When you are creating a custom enchantment through a datapack, normally the custom enchantments appear in the creative inventory. But if in the field that says "supported_item" you use an item tag that is custom from your datapack the enchanted book won't appear in the creative inventory. The enchantment will still work as intended.

       

      How to replicate:

      Create an item tag inside a datapack I placed this in: data\minecraft\tags\items\enchantable\ range.json

      Create two enchantments, one that uses the supported_items field with minecraft tags and one that uses the custom tag, these are the ones I used which should work the same way as multishot: multishot_not_visible.jsonand multishot_visible.json

      I placed them in:

      data\minecraft\enchantment\...

      Open a world with the datapack in creative and in the creative search bar write multishot. Only the visible one appears.

      But if you pick a bow (because the one that uses the custom tag includes bows as supported items) and try the command "/enchant @s minecraft:multishot_not_visible" on it, it will work as intended.

      The only problem is that it doesn't appear with custom supported items tags in the creative inventory.

        1. multishot_not_visible.json
          0.9 kB
        2. multishot_visible.json
          0.9 kB
        3. range.json
          0.1 kB

            Unassigned Unassigned
            OscarHdez103 oscar hernandez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: