Mojira Archive
MC-80876

Entity riding vehicle has always same offset

The bug

When you have any entity riding a vehicle it will always have the same y coordinate offset to the vehicle. This value seems to be "standardized" for players (about one Sixth of the player height).
If you have for now an entity with a smaller or higher hitbox riding the vehicle, it is placed wrong (see screenshots).

A "relatively" easy way to solved this would be just using something like this to get the offset:

relativePos = hitbox(vehicle).maxy - (1 / 6) * hitbox(rider).maxy

That might need to be adjusted as the top edge of the hitbox of a horse for example isn't its back.

How to reproduce

Summon a tall entity riding a horse

/summon horse ~ ~ ~ {Tame:1b,Passengers:[{id:enderman,NoAI:1b}]}