mojira.dev
MCPE-219480

q.position(1) returns the position of the camera, not the feet

The bug

The q.position(1) molang query is supposed to return the Y position of the entity. This works correctly for all entities other than the player. The result returned by the player is 1.62 greater than it should be.

How to reproduce

  1. Download and open the attached world

  2. Hold the two different items in your hand and look at the display on your screen and above the frog

Expected results

The “q.position(1)” line should always display 4.0

Observed results

The line displays 5.62 on the player on-screen display

Linked issues

Attachments

Comments 2

The server-side position of the player mob is its eye-level, similar to how the server-side position of minecarts and boats are vertically centered in the collision box. I think this is working correctly.

tryashtar

(Unassigned)

1476447

Confirmed

Windows

1.21.90.23 Preview, 1.21.80

Retrieved