Mojira Archive
MC-69826

CommandStats entity selectors will only work as long as they don't return multiple entities

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.

Works As Intended

[Mod] redstonehelper

[Mojang] Searge (Michael Stoyke)

2014-08-28, 09:19 PM

2016-10-17, 11:31 PM

2014-10-13, 05:33 PM

3

2

Unconfirmed

Minecraft 1.8-pre3, Minecraft 1.8

-