How to reproduce:
Spawn two villagers whose scores we want to affect (run this command twice):
/summon Villager ~ ~ ~ {CustomName:Max}
Set up the scoreboard and start tracking the two villagers:
/scoreboard objectives add testObj dummy
/scoreboard objectives setdisplay sidebar testObj
/scoreboard players set @e[name=Max] testObj 10
Spawn a villager which we will use to run commands from and give him appropriate CommandStats tags:
/summon Villager ~ ~ ~ {CustomName:Dave}
/stats entity @e[name=Dave] set AffectedItems @e[name=Max] testObj
Give yourself some stone which Dave can /clear later on:
/give @p stone 64
Let Dave clear your stone:
/execute @e[name=Dave] ~ ~ ~ /clear @p minecraft:stone
Notice how the scoreboard stats for the villagers named Max did not update. Kill one of the villagers named Max so there is only one entity named Max in your world, then give yourself some more stone and run the /execute command again. Notice how the scoreboard stat for the remaining villager Max did update this time.
Linked issues
is duplicated by 3
Comments 4
I will give this a try in a few days, but your comment made me realize the report was titled wrongly (AffectedItems instead of CommandStats) so thanks for that!
Not sure if this helps, but under the stats command where it has @e[name=Max], try adding c= (number > 1). I have not used the stats command nor do I know what the actions under the command do, so I'm not sure if the command isn't set up properly or if the issue is WAI.