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

Advancement criteria cannot use mooshrooms' "stew_effects" NBT field as a condition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21
    • None
    • Confirmed
    • Advancements, Data Packs
    • Normal
    • Platform

      I've created an achievement that activates when you interact with a brown mooshroom with a bowl in hand.

      However, it does not allow you to use the stew_effects NBT as a condition; in that case the advancement is never granted.

      To reproduce

      1. Add the attached data pack mc-274126.zip to your world
      2. Summon a brown mooshroom:
        /summon minecraft:mooshroom ~ ~ ~ {Type:"brown"}
      3. Use a bowl on the brown mooshroom
        → The player receives the "lightning-fueled snack" advancement (bugtest:mooshroom/works.json)
      4. Feed the brown mooshroom a wither rose
      5. Use a bowl on the brown mooshroom again

      Expected behaviour

      The player receives the "withery stew" advancement (bugtest:mooshroom/doesnt_work.json) since it is identical to the previous one, except that it requires the following NBT to be present on the mooshroom:

      {stew_effects:[{id:'minecraft:wither'}]}

      Observed behaviour

      No advancement is given.

      Advancement definition

      This is the criterion for the advancement that does not work:

      {
        "criteria": {
          "requirement": {
            "trigger": "minecraft:player_interacted_with_entity",
            "conditions": {
              "item": {
                "items": "minecraft:bowl"
              },
              "entity": {
                "type": "minecraft:mooshroom",
                "type_specific": {
                  "type": "minecraft:mooshroom",
                  "variant": "brown"
                },
                "nbt": "{stew_effects:[{id:\"minecraft:wither\"}]}" // remove this, and it works!
              }
            }
          }
        }
      }
      

      Notes

      Other NBT fields work properly, and the stew_effects NBT field is properly saved and reloaded when closing and rejoining the world.

            Unassigned Unassigned
            stickzilla21 stickzilla21
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              CHK: