GeyserMC / Geyser

A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
https://geysermc.org
MIT License
4.75k stars 687 forks source link

Player position in API always includes 1.62f offset #5061

Open RealTriassic opened 1 month ago

RealTriassic commented 1 month ago

Describe the bug

It appears that when getting the player's position using GeyserConnection#entities().playerEntity().position() or even GeyserSession#getPlayerEntity().getPosition() if using Geyser's internals, a 1.62f offset that is set here is added to the y position that is returned.

To Reproduce

  1. Make a basic extension.
  2. Use GeyserConnection#entities().playerEntity().position() to get the player's position.
  3. Observe that the y position that is returned always is 1.62f larger than it should be.

Expected behaviour

The offset should not be applied, at least not to the API method, not sure about GeyserSession#getPlayerEntity().getPosition(), just mentioning it just incase that it isn't intentional.

Screenshots / Videos

No response

Server Version and Plugins

No response

Geyser Dump

No response

Geyser Version

2.4.3-b679 (git-master-7af5bac)

Minecraft: Bedrock Edition Device/Version

No response

Additional Context

I personally observed this on Geyser Standalone, but I assume that this happens on all platforms.