At my wits end trying to detect player touching ground

Started by Park1423 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
At my wits end trying to detect player touching ground

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.

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry, This is for Mcreator…
Sat, 06/13/2026 - 21:11

Sorry, This is for Mcreator 2026.1, Neoforge, Mincraft 1.21.8

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
try making the server allow…
Sun, 06/14/2026 - 04:29

try making the server allow for slight margin of error

Joined Jun 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Detect if the players nbt …
Sun, 06/14/2026 - 11:45

Detect if the players nbt "OnGround:1b"