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

Statistic Update Timing Issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.4, 20w46a
    • Confirmed
    • (Unassigned)

      The bug

      Mobs killed statistics (and I imagine other statistics) update after advancement criteria checks, such that you cannot use them for Tracking mob kills.

      The advancement should check the players kill count for Elder Guardians every time a monster is killed and trigger once the kill count reaches 3. However, this check happens before the statistic for killing the 3rd Elder Guardian is updated, so will actually trigger on the following entity kill after the player has killed the 3rd Elder Guardian.

      How to reproduce

      1. Add the attached data pack to the world
      2. Kill 3 elder guardians (you need to make sure you haven't done this before in the world)
      3. The advancement is not granted
      4. Kill any other mob
      5. The advancement is granted

      Advancement criteria

      {
        "trigger": "minecraft:player_killed_entity",
        "conditions": {
          "player": {
            "player": {
              "stats": [
                {
                  "type": "minecraft:killed",
                  "stat": "minecraft:elder_guardian",
                  "value": {
                    "min": 3
                  }
                }
              ]
            }
          }
        }
      }
      

       

            Unassigned Unassigned
            old_qrow Paul Leunig
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: