mojira.dev
MC-277625

Player's OnGround tag doesn't update when riding a vehicle

When riding a vehicle, the OnGround tag doesn't update.

How to reproduce:

  1. Summon a pig and place a saddle on it.

  2. While flying in the air, execute the following command:

    /data get entity @s OnGround

    → ✔ The tag is set to false (0b).

  3. Ride the pig without touching the ground.

  4. Execute the command from step 2 again.
    → ✔ The tag is set to false (0b).

  5. Dismount the pig.

  6. While on the ground, execute the command from step 2 again.
    → ✔ The tag is set to true (1b).

  7. Ride the pig again.

  8. Execute the command from step 2 again.
    → ❌ The tag is set to true (1b).

Expected result:

The OnGround tag would always be false while riding an entity, like in previous versions.

Observed result:

The OnGround tag keeps its value from before riding an entity, which sometimes makes it inaccurate.

Linked issues

Comments 2

Can confirm in 1.21.2 pre-4

This also affects the is_on_ground entity predicate:

/execute if predicate {condition:"entity_properties",entity:"this",predicate:{flags:{is_on_ground:1b}}}

100percentme

(Unassigned)

Confirmed

Platform

Normal

Player

1.21.2 Pre-Release 3, 1.21.2 Pre-Release 5

1.21.2 Release Candidate 2

Retrieved