mojira.dev
MC-112344

Testing an entity's 'OnGround' NBT when inside certain blocks will return inconsistent results.

When testing an entity's 'OnGround' nbt data while they are standing inside certain blocks such as; cobwebs, berry bushes, and powdered snow, the game will return an inconsistent value at a fairly consistent rate.

Steps to Reproduce:

  1. Run the following command in a repeating command block
    (The player's name will be printed in chat if they are NOT on the ground)

    /say @a[nbt={OnGround:0b}]
  2. Stand inside one of the following:
    → Cobweb
    → Berry Bush
    → Powdered Snow

  3. Jump, and wait to return to ground level

Expected & Observed Results:

āŒ - The values printed will primarily be empty messages, but on occasion the player's name will be printed (indicating that the return value was false). This happens at a fairly consistent rate.
āœ” - The messages displayed in chat would always be empty messages, as the player is on the ground.

Screenshots/Videos:

[media]

Notes:

Moving around inside the block will actually negate the observed behavior. The player must be standing still for the inconsistent result.

Linked issues

Attachments

Comments 6

Don't you mean

3. /scoreboard players tag @a[tag=inAir] remove inAir

? Cause you have removing a score objective instead of the tag.

Yep, I'm stupid idk what I was doing when I wrote that

Can confirm in 1.17.1.

Can confirm in 1.20.2 and 23w41a:

[media]

This seems to only occur when standing still, and not moving. Also, it seems to not be all too "random", and actually fairly consistent. I have no code source for this, but it (to me) seems like every 20 ticks is when it miscalculates the ground check.

I would actually like to request ownership of this issue as the original poster has not updated the issue since 2019, and I have written the new description, so I understand it.

I have the problem when I jump and when I’m teleported, especially in laggy server

(in 1.21.6 snapshots)

Onnowhere

[Mod] Jingy

(Unassigned)

Confirmed

Entities

OnGround, nbt

Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w15a, Minecraft 1.12 Pre-Release 2, Minecraft 1.12, ..., 1.20.2, 23w41a, 1.20.4, 1.20.5, 1.21.1

Retrieved