Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-257007

Players are sometimes considered OnGround while completely midair after a teleport

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.19.2
    • None
    • Windows 10, adoptium jdk 17.0.5
    • Unconfirmed
    • (Unassigned)

      I was trying to use the OnGround check to see if all players have reached the ground, some conditions teleport them back up into the air (before they come close the ground). I noticed that sometimes I get stray triggers and I found that OnGround sometimes is 1 after a teleport while the player was never near ground.

      In fact teleporting relatively (which I did for testing) does not cancel velocity so it shouldn't be related to velocity I think.

      I reproduced this in a superflat with one repeating command block (at -60):

      execute as @a[dx=20,dz=20,y=-55,dy=1000,nbt={OnGround:1b}] run say ground

      Then I just keep spamming teleport commands in chat (with 50 blocks you gotta spam fast or you just hit the ground due to terminal velocity), with the selector above you gotta stand in x+ and z+ from the command block

      /tp ~ ~50 ~

      And then (somewhat rarely) this happens:

      [13:54:16] [CHAT] Teleported 2called_chaos to 10.815072, -10.000000, 22.672274
      [13:54:17] [CHAT] Teleported 2called_chaos to 10.815072, 35.155522, 22.672274
      [13:54:17] [CHAT] Teleported 2called_chaos to 10.815072, 72.683930, 22.672274
      [13:54:18] [CHAT] Teleported 2called_chaos to 10.815072, 107.878898, 22.672274
      ...
      [13:54:29] [CHAT] Teleported 2called_chaos to 10.815072, 89.161479, 22.672274
      [13:54:29] [CHAT] Teleported 2called_chaos to 10.815072, 92.370716, 22.672274
      [13:54:30] [CHAT] Teleported 2called_chaos to 10.815072, 91.620543, 22.672274
      [13:54:30] [CHAT] Teleported 2called_chaos to 10.815072, 98.639744, 22.672274
      [13:54:32] [CHAT] Teleported 2called_chaos to 10.815072, 54.774634, 22.672274
      [13:54:32] [CHAT] [2called_chaos] ground
      [13:54:33] [CHAT] Teleported 2called_chaos to 10.815072, 38.234721, 22.672274
      [13:54:33] [CHAT] Teleported 2called_chaos to 10.815072, 41.247289, 22.672274
      [13:54:34] [CHAT] Teleported 2called_chaos to 10.815072, 44.248530, 22.672274
      [13:54:34] [CHAT] Teleported 2called_chaos to 10.815072, 47.240883, 22.672274
      ...
      [13:54:41] [CHAT] Teleported 2called_chaos to 10.815072, 164.230891, 22.672274
      [13:54:42] [CHAT] Teleported 2called_chaos to 10.815072, 175.032237, 22.672274
      [13:54:42] [CHAT] Teleported 2called_chaos to 10.815072, 181.913427, 22.672274
      [13:54:43] [CHAT] Teleported 2called_chaos to 10.815072, 177.034594, 22.672274
      [13:54:43] [CHAT] Teleported 2called_chaos to 10.815072, 183.915295, 22.672274
      [13:54:43] [CHAT] [2called_chaos] ground
      [13:54:44] [CHAT] Teleported 2called_chaos to 10.815072, 167.276099, 22.672274
      [13:54:45] [CHAT] Teleported 2called_chaos to 10.815072, 158.476596, 22.672274
      [13:54:46] [CHAT] Teleported 2called_chaos to 10.815072, 161.436887, 22.672274
      [13:54:46] [CHAT] Teleported 2called_chaos to 10.815072, 160.477121, 22.672274
      [13:54:46] [CHAT] [2called_chaos] ground
      [13:54:48] [CHAT] Teleported 2called_chaos to 10.815072, 100.717423, 22.672274
      [13:54:48] [CHAT] Teleported 2called_chaos to 10.815072, 103.677492, 22.672274
      [13:54:49] [CHAT] Teleported 2called_chaos to 10.815072, 110.557534, 22.672274
      [13:54:49] [CHAT] Teleported 2called_chaos to 10.815072, 117.437559, 22.672274
      [13:54:51] [CHAT] Teleported 2called_chaos to 10.815072, 65.517571, 22.672274
      [13:54:51] [CHAT] Teleported 2called_chaos to 10.815072, 72.397560, 22.672274
      [13:54:52] [CHAT] Teleported 2called_chaos to 10.815072, 79.277544, 22.672274
      [13:54:52] [CHAT] Teleported 2called_chaos to 10.815072, 86.157522, 22.672274
      [13:54:53] [CHAT] Teleported 2called_chaos to 10.815072, 89.117494, 22.672274
      [13:54:53] [CHAT] [2called_chaos] ground
      [13:54:54] [CHAT] Teleported 2called_chaos to 10.815072, 92.077462, 22.672274
      [13:54:55] [CHAT] Teleported 2called_chaos to 10.815072, 44.077387, 22.672274
      [13:54:55] [CHAT] Teleported 2called_chaos to 10.815072, 50.957351, 22.672274
      [13:54:56] [CHAT] Teleported 2called_chaos to 10.815072, 42.157300, 22.672274
      [13:54:56] [CHAT] [2called_chaos] ground
      

            Unassigned Unassigned
            2called-chaos Sven
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: