Topic category: Help with Minecraft modding (Java Edition)
So I've been working on this for a while now and what I need is accurate ground detection for a custom flight script. I've done a lot of testing and here is what I've found:
1. Client Ground detection using player.onGround() is very accurate. More so than running player.onGround() serverside
2. Server and client player position have like a 0.003+ desync. This causes the client to think it cant move down anymore and the server to think the player still isn't on the ground.
3. A script to round the player's Y on the server before checking if the player is on the ground works, but has the player's Y constantly being rounded. Which results in jittering.
Any help would be appreciated. I really don't know what to do anymore. I've spent hours on this one thing and am ready to be done with it.
Sorry, This is for Mcreator 2026.1, Neoforge, Mincraft 1.21.8
try making the server allow for slight margin of error
Detect if the players nbt "OnGround:1b"