-
Bug
-
Resolution: Invalid
-
None
-
Minecraft 1.11, Minecraft 1.11.2
-
None
-
Confirmed
The second selector of the /stats entity command does not find marker armorstands that are in the upper half of a block when using r=0 or dy=?.
Steps to reproduce:
/scoreboard objectives add STATS_TEST dummy
/scoreboard objectives setdisplay sidebar STATS_TEST
/summon armor_stand ~ 57.6 ~ {Tags:["statsTest"],NoGravity:1,Marker:1}
/scoreboard players set @e[type=armor_stand,tag=statsTest] STATS_TEST 0
/stats entity @e[type=armor_stand,tag=statsTest] set SuccessCount @e[type=armor_stand,tag=statsTest,r=0,c=1] STATS_TEST
/execute @e[type=armor_stand,tag=statsTest] ~ ~ ~ testfor @p
After the execute-testfor command the armorstand should have a score of 1, but it has a score of 0. If I repeat the same experiment with other y values and other selectors instead of
r=0
there are the results:
r=0 | r=1 | dy=0 | dy=1 | |
---|---|---|---|---|
57.0 | ||||
57.1 | ||||
57.4 | ||||
57.5 | ||||
57.6 | ||||
57.9 |
A useful command to get rid of all the Armorstands
/kill @e[type=armor_stand,tag=statsTest]
Here is a OneCommand that creates the setup
summon falling_block ~ ~1 ~ {Block:redstone_block,Time:1,Passengers:[{id:falling_block,Block:activator_rail,Time:1},{id:commandblock_minecart,Command:fill ~1 ~-2 ~1 ~4 ~-1 ~2 air},{id:commandblock_minecart,Command:setblock ~2 ~-2 ~2 command_block 5 {Command:scoreboard objectives add STATS_TEST dummy}},{id:commandblock_minecart,Command:setblock ~3 ~-2 ~2 chain_command_block 5 {auto:1,Command:scoreboard objectives setdisplay sidebar STATS_TEST}},{id:commandblock_minecart,Command:setblock ~4 ~-2 ~2 chain_command_block 1 {auto:1,Command:summon armor_stand ~ 57.6 ~ {Tags:["statsTest"],NoGravity:1,Marker:1}}},{id:commandblock_minecart,Command:setblock ~4 ~-1 ~2 chain_command_block 4 {auto:1,Command:scoreboard players set @e[type=armor_stand,tag=statsTest] STATS_TEST 0}},{id:commandblock_minecart,Command:setblock ~3 ~-1 ~2 chain_command_block 4 {auto:1,Command:stats entity @e[type=armor_stand,tag=statsTest] set SuccessCount @e[type=armor_stand,tag=statsTest,r=0,c=1] STATS_TEST}},{id:commandblock_minecart,Command:setblock ~2 ~-1 ~2 chain_command_block 4 {auto:1,Command:execute @e[type=armor_stand,tag=statsTest] ~ ~ ~ testfor @p}},{id:commandblock_minecart,Command:setblock ~ ~-2 ~ command_block},{id:commandblock_minecart,Command:setblock ~ ~2 ~ command_block 0 {Command:fill ~ ~-3 ~ ~ ~ ~ air}},{id:commandblock_minecart,Command:setblock ~ ~1 ~ redstone_block},{id:commandblock_minecart,Command:kill @e[type=commandblock_minecart,r=0]}]}