mojira.dev
MC-96927

Selector C= Targeting Inaccurate Entity Position

There seems to be some inaccuracies with selecting entities at coordinates at the center of blocks due to some issue with positioning.

Test:

0. Teleport to a coordinate with no decimals at the center of a block such as by /tp 0 0 0 or /tp 18 32 12.

1. /summon Pig ~ ~ ~ {NoAI:1b}

2. /tp ~1 ~ ~

3. /summon ArmorStand

4. /say @e[type=!Player,c=1]

5. Notice the result is the pig, rather than the armor stand which is clearly closer and you are standing inside it directly at its location.

6. /say @e[type=!Player,r=5]

7. Notice that the first result is the pig rather than the armor stand which if it was selecting correctly, should be displaying the armor stand first in the list of results due to it being closer. see MC-97316

8. Repeat test with various entities to see the same results.

Linked issues

Attachments

Comments 15

SunCat

Confirmed

Meri Diana

Related to MC-97316
97316 rather for discussion about selector "r" and here for "c", to differentiate between both.
Would that be okay @unknown?

Should probably mention that c-execution got an directional bias, thus executing it directly at the entity would be more consistent, accurate, easier.
(Correct me if I'm mistaken, you're better at that topic };])

Irbis

Maybe it's selecting entities from oldest instead of nearest? I can't test it for now, can someone?

Meri Diana

@unknown The way it works is that it detects firstly nearest or farthest (depending on whether c got a positive or negative value), and if there are at least 2 entities at the very same position/distance, then it'll fall back to the second detection method, the age(youngest/oldest, dependant on +/-).

onnowhere

ok changed it to focus on c=

5 more comments
Meri Diana

Still directional bias for c-selector confirmed, 2 screenshots attached.

Skylinerw

Seems to have been fixed in 1.9.1 pre-1.

user-f2760

anybody else still able to reproduce?

onnowhere

Seems fixed! 1.9 pre-1

Meri Diana

[Bot] Arisa seems to be different opinion Ö.ö

Seems also fixed/well-changed for me in 1.9 pre-1, detection is now with really tiny values, awesome }=)

onnowhere

(Unassigned)

Community Consensus

Minecraft 16w06a, Minecraft 16w07a, Minecraft 16w07b, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 3, Minecraft 1.9 Pre-Release 4, Minecraft 1.9

Minecraft 1.9.1 Pre-Release 1

Retrieved