mojira.dev
MC-219792

It seems there's a bug with the teleport command

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.

Linked issues

Attachments

Comments 3

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

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

-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

(Unassigned)

Unconfirmed

(Unassigned)

1.16.5

Retrieved