mojira.dev
MC-263516

The levels condition for the trigger enchanted_item is outdated

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.

Attachments

Comments 2

Advancements were added after that change, more specifically 1.12.
The levels condition SHOULD refer to the enchanting table's power (the amount of bookshelves).

Thank you for your report!
After consideration, the issue is being closed as Invalid.

You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

tholleman

(Unassigned)

Confirmed

(Unassigned)

1.20.1, 1.20.4, 24w03b

Retrieved