player.getLocation() returns incorrect Y value when riding a mob
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Expected behavior
when a player mounts a horse, their y level increases by 0.85, the ride height of the horse, as indicated on their f3 and by running minecraft:tp ~ ~ ~ to get position, this should be reflected by player.getLocation().
Observed/Actual behavior
Calling player.getLocation() returns the y value of the player's vehicles feet as when they are not on the vehicle at all.
Steps/models to reproduce
Check every tick player.getLocation(), mount a horse, at for example y level 60, when you are on the horse it will correctly return your Y level as 60.85, but once you add a saddle, enabling control of the vehicle, the y level glitches between 60.85 and 60.0 randomly.
Plugin and Datapack List
N/A
Paper version
git-Paper-"f090298" (MC: 1.19)
Other
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with player.getLocation() while riding a saddled horse at a known Y level, comparing it with the in-game F3 display and minecraft:tp ~ ~ ~. Trace how player.getLocation() reports the vehicle and rider positions, then verify that the returned Y value remains consistently at the rider's ride height.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100