summon area_effect_cloud 0 0 0 {CustomName:"{\"text\":\"0\"}",Duration:1,Tags:[test_e]}
summon area_effect_cloud 0.1 0 0 {CustomName:"{\"text\":\"1\"}",Duration:1,Tags:[test_e]}
summon area_effect_cloud 0.2 0 0 {CustomName:"{\"text\":\"2\"}",Duration:1,Tags:[test_e]}
summon area_effect_cloud 0.3 0 0 {CustomName:"{\"text\":\"3\"}",Duration:1,Tags:[test_e]}
summon area_effect_cloud 0.4 0 0 {CustomName:"{\"text\":\"4\"}",Duration:1,Tags:[test_e]}
execute positioned 0 0 0 run say @e[tag=test_e,limit=1,sort=furthest]
execute positioned 0 0 0 run kill @e[tag=test_e,limit=1,sort=furthest]
execute positioned 0 0 0 run say @e[tag=test_e,limit=1,sort=furthest]
Running this function should output:
4
3
but the actual output is:
1
2
summon area_effect_cloud 0 0 0 {CustomName:"{\"text\":\"0\"}",Duration:1,Tags:[test_e]}
summon area_effect_cloud 0.1 0 0 {CustomName:"{\"text\":\"1\"}",Duration:1,Tags:[test_e]}
summon area_effect_cloud 0.2 0 0 {CustomName:"{\"text\":\"2\"}",Duration:1,Tags:[test_e]}
summon area_effect_cloud 0.3 0 0 {CustomName:"{\"text\":\"3\"}",Duration:1,Tags:[test_e]}
summon area_effect_cloud 0.4 0 0 {CustomName:"{\"text\":\"4\"}",Duration:1,Tags:[test_e]}
execute positioned 0 0 0 run say @e[tag=test_e,limit=1,sort=nearest]
execute positioned 0 0 0 run kill @e[tag=test_e,limit=1,sort=nearest]
execute positioned 0 0 0 run say @e[tag=test_e,limit=1,sort=nearest]
Running this function should output:
0
1
but the actual output is:
0
4
Comments 3
The default offset by 0.5 is an intended feature.
Does @unknown's comment explain your problem or is there still a bug here?
The x and z coordinates will be center-corrected (which is a helpful feature in some cases but a bit confusing in other cases), that means
0 0 0
will be treated as0.5 0 0.5
. You have to change all0
in x and z coordinates to0.0
:Everything works as your intention now.