-
Bug
-
Resolution: Fixed
-
Minecraft 1.13.1, 1.15.2, 20w06a, 20w20b, 1.19, 23w04a, 1.20.2, 23w43b
-
Confirmed
-
Commands
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.