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

Constant teleport while on ground incorrectly placing player slightly above ground

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 16w03a, Minecraft 16w04a, Minecraft 16w05a, Minecraft 16w05b, Minecraft 16w06a, Minecraft 16w07a, Minecraft 16w07b, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 3, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 1.9.4, Minecraft 16w21a, Minecraft 1.10 Pre-Release 2, Minecraft 1.10, Minecraft 16w39c, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w15a, Minecraft 17w16a, Minecraft 1.12 Pre-Release 2, Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.12.2, Minecraft 17w48a, Minecraft 17w49b, Minecraft 18w50a, 1.15 Pre-Release 2, 1.15 Pre-release 4, 1.16.1
    • None
    • Confirmed
    • Commands
    • Low
    • Platform

      NOTE: Constant teleport with a command to testfor OnGround:1b running after it will always make the testfor output true, even if the player isn't actually on the ground. Place a repeat command running the teleport running into a chain command running testfor OnGround:1b and then put a comparator output to see that the command outputs true no matter where the player gets teleported. See MC-108209

      Note: The same occurs with /teleport in 1.10

      When a player is constantly teleported via command block, while they are not flying and on the ground and the coordinates they are being teleported are on ground, the camera will jitter a very small but noticeable amount. This is probably due to the teleport for some reason not placing the player completely on the ground. This can be seen by using a constant teleport while having slowness 6. When you try to move without teleporting, you can't due to the slowness, however when you are being teleported, you can move slightly, which hints that the teleport is placing the player slightly off the ground.

      When relative coordinates are used, the player IS placed correctly on the ground, despite the coordinate shown being the same on the y axis as the exact number teleport.

      To reproduce:

       

      Test with relative coordinates:

      1. Stand on a location without flying.
      2. Place a repeat command block with /tp @p ~ ~ ~.
      3. Notice that when you are standing on the ground correctly and there is no jittery camera.
      4. Slowness 6 should prevent all player directional movement:

      /effect @p slowness 1000 6

       

      1.13: /effect give @p slowness 1000 6

      5. Notice that when you move, you can't due to you being correctly placed on the ground, unlike using exact number coordinates in previous tests.

       

       

      Test 2 with just teleport:

      1. Stand on a location without flying.
      2. Place a repeat command block that teleports you to your exact location where you are standing on the ground and set it to run. (NO RELATIVE COORDINATES! Something like /tp @p 9.123 25.0 23.1)
      3. Notice camera slightly jittering.

      Test 3 with slowness:

      1. Stand on a location without flying.
      2. Slowness 6 should prevent all player directional movement: /effect @p slowness 1000 6
      3. Try to move, see that you cannot.
      4. Place a repeat command block that teleports you to your exact location where you are standing on the ground and set it to run. (NO RELATIVE COORDINATES! Something like /tp @p 9.123 25.0 23.1)
      5. Try to move, see that you slightly move towards where you are going, suggesting that you are not completely on the ground but very slightly above it.

      Test 4 with OnGround (NO LONGER TESTABLE AS OF 16w39c - see MC-108209):

      1. Stand on a location without flying.
      2. Place a repeat command block that teleports you to your exact location where you are standing on the ground and set it to run. (NO RELATIVE COORDINATES! Something like /tp @p 9.123 25.0 23.1)
      3. Place a repeat command block that runs

      /testfor @p {OnGround:1b}

       

      1.13: /execute if entity @p[nbt={OnGround:1b}]

      and run the command with a comparator out of it
      4. Notice that the comparator turns off when the teleport command is running and turns back on when the teleport command stops. This means that the player is not on the ground according to the game while the teleport is happening. See Marcono1234's comment below.


      Code analysis by marcono1234 can be found in this comment.

            Unassigned Unassigned
            onnowhere Onnowhere
            Votes:
            14 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              CHK: