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

Statistic Update Timing Issue

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.16.4, 20w46a
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      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
                  }
                }
              ]
            }
          }
        }
      }
      

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            old_qrow Paul Leunig
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: