mojira.dev
MC-310320

Recipe definitions can be inlined in some advancement triggers

The bug

The recipe_unlocked, recipe_crafted, and crafter_recipe_crafted advancement trigger criteria specify a list of recipe IDs for which unlocking or crafting them will run the trigger. However, now these recipes can be inlined as full recipe definitions, which is pointless because it’s impossible to interact with a recipe that’s not registered as an actual recipe.

How to reproduce

  1. Download and apply the attached data pack: [mediaInline]
    It contains the following advancement definition:

    {
      "criteria": {
        "test": {
          "trigger": "recipe_unlocked",
          "conditions": {
            "recipes": {
              "type": "crafting_shapeless",
              "ingredients": ["apple"],
              "result": "apple"
            }
          }
        }
      }
    }
  2. Run /advancement grant @s only test:test

Expected result

The advancement should fail to load

Observed result

It loads, but will never trigger

Linked issues

Attachments

Comments 0

No comments.

tryashtar

(Unassigned)

Confirmed

Platform HC

Low

Advancements, Data Packs

26.3 Snapshot 5

Retrieved