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

Referencing predicates is not allowed on enchantments in datapacks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 1.21
    • None
    • Unconfirmed
    • (Unassigned)

      The bug: Using the reference predicate type in an enchantment definition will prevent the datapack from loading, for the reason "java.lang.IllegalStateException: Validation error in enchantment effect condition: at : Uses reference to minecraft:player, but references are not allowed". This is not documented anywhere on the wiki or in the snapshot changelogs to my knowledge

      Expected behaviour: The datapack loads and uses the predicate referenced

      How to reproduce: Install the provided datapack, and try to load it in a world, which will prevent the world from loading or the datapack from validating.

      when you remove the condition for the draft:predicate_test enchant, the datapack will load just fine

            Unassigned Unassigned
            305pence 305pence
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: