I recreated this bug 2 times.
I was trying to display the "AffectedBlocks" stats of a clone command on the sidebar.
First I wrote the following command inside an Impulse command block.
clone ~ ~ ~ ~ 0 ~ -635 4 1452
When executed, this command should give (and indeed does, when you look into the "Previous Output" bar) the number of blocks between the command block and Level 0 as an AffectedBlocks output.
To achieve this, I applied the following stats-command on an armor stand called stats, while standing on top of the command block:
/stats block ~ ~-1 ~ set AffectedBlocks @e[type=armor_stand,name=stats,c=1] Coordinate
The stats were applied and I manually set the score of the armor stand for the objective "Coordinate" to "0", as this is necessary for the stats command to work.
I now activated the Impulse command and the number 5 was displayed on the scoreboard. The correct number of blocks between the command block and Level 0. I now changed the command to:
execute @a ~ ~ ~ clone ~ ~ ~ ~ 0 ~ -635 4 1452
When executed the command should give me the number of blocks between the player and Level 0, however the number on the side didn't change, the output of the command block (when you look inside it) did. It displayed the Output "[19:56:16] 4 blocks cloned".
When I changed it to the following command:
clone ~ ~-1 ~ ~ 0 ~ -635 4 1452
It again gave me the right output and it was displayed correctly on the sidebar.
I tried storing the stats-Command on different entities, using Repeat, Chain and Impulse command blocks and switching between worlds.
Attachments
Comments 6
Sure!
Here's the first command I used and the Output it showed after I pressed the button:
[media]
I now placed an armorstand named "stats" on the command block and I myself also stood on the block. I then executed the following command:
[media][media]
I now set the score of the player "@e[type=armor_stand,name=stats]" to 0 for the objective "Coordinate":
[media]
I now pressed the button and the following happened:
[media][media]
These are all correct and the stats command was working properly. Now I changed the command to the following:
[media]
I then executed the command, while being at a different y Coordinate so I'd get a different output than 5, and the scoreboard didn't change (It should display "4" now):
[media]
As you hopefully can see (It is a bit difficult to read to be honest) the scoreboard didn't change, the Output however did.
Reapplying the /stats command or changing the entity involved doesn't change the outcome.
Isn't it the case that you're changing the executor from the block to the player? You'll have to set the /stats
of the player instead of the block.
Could you provide screenshots of the progress, and actually provide the numbers that the stat should/does show?