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

"execute store score" does not store 0 when subcommand is "advancement" and fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.13.1
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      The command 

      execute store (result|success) score <target> <objective> run advancement (grant|revoke) <target> only <advancement>
      

      does not update <objective> for the objective target when the advancement command fails.

      This bug might be related to MC-123068.

      Setup

      Run these commands:

      scoreboard objectives add test dummy
      scoreboard players set @s test 100
      advancement revoke @s only minecraft:recipes/decorations/chest
      advancement grant @s only minecraft:recipes/decorations/torch
      scoreboard objectives setdisplay sidebar test
      

      Reproduction

      Run the commands

      execute store success score @s test run advancement revoke @s only minecraft:recipes/decorations/chest
      execute store success score @s test run advancement grant @s only minecraft:recipes/decorations/torch
      

      Your score for the test objective is expected to update to 0 after each command, because the commands fail, however your score remains 100 in both cases.

      Note that you can use either "execute store success" or "execute store result" in the two commands above and the effect is the same: you would expect the score to be set to 0, but it remains unchanged.

      Why care?

      This is the only way I could figure how to detect whether a player has received an advancement. If there is a better way, someone please let me know. If there isn't, an updated command like

      advancement query <selector> <advancement>
      

      would be very useful.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              machadeon Ryan Cheatham
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                CHK: