mojira.dev
MC-99540

CommandStat Doesn't Work On Marker ArmorStand

First summon a marker stand.

/summon ArmorStand ~ ~ ~ {Marker:1b}

And setup an objective to store command stats (use SuccessCount as example.)

/scoreboard objectives add success dummy
/scoreboard objectives setdisplay sidebar success
/scoreboard players set @e[type=ArmorStand] success 0

Then make a RCB chain running following commands.

/stats entity @e[type=ArmorStand] set SuccessCount @e[type=ArmorStand,c=1] success
/execute @e[type=ArmorStand] ~ ~ ~ testfor @a[r=3]
/stats entity @e[type=ArmorStand] clear SuccessCount

(No need to loop stats command actually, I did this just to make sure no other commands except the middle one could affect "success")

Once it's settle, stand in the range of the marker stand and you will find that success value remains at 0.

Now change it into normal armor stand.

/entitydata @e[type=ArmorStand] {Marker:0b}

And walk into the range again, success value becomes 1.

I'm not sure this is caused by the /stats command function or the data stored in marker armor stand.

Comments 6

It's likely your issue is actually MC-88533. The player is not found because the origin of execution is not where you're expecting it to be, so the score isn't going to change.

Not really, I used r=3 instead of r=0, and even r=0 works properly for me in 1.9 pre 3, I have reasons to believe that it's somewhere different.

Can you provide a world download? I cannot reproduce it.

I think I've found the cause. Can close this issue.

this bug still exists in 1.9.2

ChichaST

(Unassigned)

Unconfirmed

Minecraft 1.9.1 Pre-Release 3

Retrieved