mojira.dev
MC-124828

Confusing error with /tp

Writing the command:
```/tp -1082 4 -158```
The game will teleport me to -1081, 4, -157

The game will recognize and enter in chat and in the logs, that i typed:
```/tp -1081 4 -157```

Linked issues

Comments 2

This is how coordinates work; see MC-4794 for more information.

In 18w05a, everything works normally. using /tp ~ ~ -200 will update my z coordinate to -199.5 under the XYZ: section of the f3 menu, abd the Block: section shows -200 as my z value, as expected. You left out the fact that it showed your coordinates as -1081.5 4 -157.5, which makes a big difference. Whole number coordinates are at the edges of blocks, and /tp uses the center of blocks when using an integer value for teleporting. This is why your coordinates are shifted by 0.5 blocks from what you specified in the /tp command, and it is intentional behavior. Use /tp -1082.0 4 -158.0 to get the results you expected.

Matt

(Unassigned)

Unconfirmed

Minecraft 1.12.2

Retrieved