Mojira Archive
MC-89667

Position based selector arguments fail finding entity if it has been moved to a different chunk in the same tick

The bug

Selector arguments which select entities based on their position fail finding them if they have been moved to a different chunk in the same tick. Moving the entity to the next chunk might not always cause this bug since the initial entity search area can be larger than the specified values.
The root cause is likely MC-108469 because at least in 1.12.2 selectors get the entities to check from the respective chunks and if the entity lists have not been updated the entities will not be found.

Note: This does not affect the @s selector.

Affected selector arguments

Last updated for 17w50a

  • distance
  • dx
  • dy
  • dz

How to reproduce

  1. Place an impulse command block with the following command
    /execute as @e[type=armor_stand] at @s run teleport @s ~33 ~ ~
    
  2. Place an always active chain command block with the following command behind it
    /execute as @e[type=armor_stand] at @s run say @e[distance=0]
    
  3. Place an armor stand
  4. Power the impulse command block
    It fails finding itself