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

It seems there's a bug with the teleport command

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.16.5
    • None
    • Unconfirmed
    • (Unassigned)

      I'm using /teleport commands in my world, and for some reason when the command is executed, the command, it teleports me just a little bit away from where it told me to. For example, I type /tp @s -164 4 -14. But when I execute the command, it instead teleports me to -163 4 -13. This applies to /setblock commands too. If I want to teleport to -164 4 -14, I have to instead write /tp @s -165 4 -15, or I have to write decimal values, for example /tp @s -164.700 4 -14. But this doesn't work for /setblock commands, so in order to set blocks, I have to finetune the coordinates to make up for the error.

      I think this is a bug because I make absolutely sure that I input the correct coordinates, but it consistently teleports me to the wrong place and sets blocks in the wrong places.

        1. Capture.PNG
          Capture.PNG
          881 kB
        2. Capture1.PNG
          Capture1.PNG
          946 kB

          [MC-219792] It seems there's a bug with the teleport command

          [Mod] tryashtar added a comment - - edited

          -144 + 0.5 = -143.5
          84 + 0.5 = 84.5

          You can avoid this by writing out -144.0 and 84.0 explicitly, if you want to end up on the edge of the block instead of the middle. But the block it teleports you to is the correct one, right in the center of it.

          [Mod] tryashtar added a comment - - edited -144 + 0.5 = -143.5 84 + 0.5 = 84.5 You can avoid this by writing out -144.0 and 84.0 explicitly, if you want to end up on the edge of the block instead of the middle. But the block it teleports you to is the correct one, right in the center of it.

          Mark added a comment -

          I'm sorry, I don't understand how this resolves the issue. How exactly does adding 0.5 to the coordinates teleport me to a completely different block, and how do I fix this issue?
          I don't know how to mention people here, so I'll try this. @tryashtar

          Mark added a comment - I'm sorry, I don't understand how this resolves the issue. How exactly does adding 0.5 to the coordinates teleport me to a completely different block, and how do I fix this issue? I don't know how to mention people here, so I'll try this. @tryashtar

          See MC-4794, it adds 0.5 to center you on the block

          [Mod] tryashtar added a comment - See MC-4794 , it adds 0.5 to center you on the block

            Unassigned Unassigned
            MarkBV Mark
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: