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

The levels condition for the trigger enchanted_item is outdated

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.1, 1.20.4, 24w03b
    • None
    • Confirmed
    • (Unassigned)

      It's possible to create an advancement that's granted when a player enchants items. A condition can be added to that trigger that qualifies how many levels the player should use before granting the advancement. However, setting this to 30 levels will not work since only 3 levels are actually removed from the player.

      I can't be sure about the history but I think that this condition has been kept the same after changing the enchanting system in 1.8. Back then, all levels would be removed which would make this condition much more useful.

      Here's an example advancement that I would expect to work:

      {
        "display": {
          "icon": {
            "item": "minecraft:bookshelf",
            "nbt": "{Enchantments:[{}]}"
          },
          "title": "Artificer",
          "description": "Enchant an item at level 30"
        },
        "parent": "minecraft:story/enchant_item",
        "criteria": {
          "requirement": {
            "trigger": "minecraft:enchanted_item",
            "conditions":

      {         "levels": 30       }

          }
        }
      }

      I've attached a datapack with this advancement to test for yourself.

            Unassigned Unassigned
            tholleman tholleman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: