mojira.dev
MC-313447

Entity distance predicates reject entities exactly at some decimal distance limits, unlike entity selectors

The Bug:

Entity distance predicates reject entities exactly at some decimal distance limits, unlike entity selectors.

Steps to Reproduce:

  1. Teleport to the center of the world and summon a marker 0.1 blocks away from it by using the commands provided below.

    /tp @s 0 64 0
    /summon minecraft:marker 0.1 64.0 0.0
  2. Test whether the marker is within 0.1 blocks of 0 64 0, first with an entity selector and then with an entity predicate, by using the commands provided below.

    /execute positioned 0.0 64.0 0.0 if entity @e[type=minecraft:marker,distance=..0.1]
    /execute positioned 0.0 64.0 0.0 as @n[type=minecraft:marker] if predicate {type:"minecraft:entity_properties",entity:"this",predicate:{"minecraft:distance":{absolute:{max:0.1}}}}
  3. Observe if both tests pass.

Observed Behavior:

Entity distance predicates reject entities exactly at some decimal distance limits.

Expected Behavior:

Entity distance predicates would accept entities exactly at their distance limits, just like entity selectors.

Attachments

Comments 1

Avoma

(Unassigned)

Confirmed

Commands, Data Packs

26.3, 26.4 Snapshot 10

Retrieved