mojira.dev
MC-4794

Teleporting to negative coordinates is inaccurate

Moderator Note:

This is working as intended as there is no +0 and -0 coordinate. 0 itself cannot be positive or negative, there are only coordinates greater or less than 0.
The coordinate of a block is the coordinate rounded down, meaning anything from -0.1 to -1.0 is part of the -1 block coordinate. The center of the block at -1 is at -0.5.

[media]

When teleporting to a negative coordinate, the player ends up one block closer to 0.

For example, if I type "/tp 400 60 -704", I will instead end up in 400 60 -703.
-25 50 -39 would end up in -24 50 -38.
The same problem occurs if using command blocks.

I am not sure if the issue is present in previous versions.

Linked issues

MC-1988 Teleport command doesn't work good in the command block Resolved MC-2080 The tp command teleports you to the z you gave -1. Resolved MC-2849 Incorrect teleport location Resolved MC-6253 Odd Command Block / Teleportation behavior Resolved MC-7467 Minecraft command block tp bug Resolved

Attachments

Comments 14

Please take a closer look at the coordinates.

The coordinates mark the corners of the blocks.
If you omit the fractinonal digits, you land always at the center of the nearest block (seen in +x, +z direction):

  • If you teleport to 1 / y / 1, you land at 1.5 / y /1.5

  • If you teleport to -1 / y / -1 you land at -0,5 / y / -0.5

but if you specify the fractinonal digits, you land excactly at given coordinates:

  • If you teleport to 1.0 / y / 1.0, you land at 1.0 / y /1.0

  • If you teleport to -1.0 / y / -1.0 you land at -1.0 / y / -1.0

I don't think that this works as intended because if you look next to the exact coordinates (next to all those numbers) there are parenthesis with an integer of your x/z. If x = -849. 21371, the integer will be 850, but if z = 360.78782 then the integer will be 360. For some reason if the coordinate is negative, it will add one to make it an integer. I think it's still a bug.

It's all correct.
Think of a coordinate system on graph paper. The axes of the coordinate system go exactly through each one line on the paper, the squares on the paper are the blocks.
--> The integer coordinates mark the corners of the blocks, not the blocks itself.

  • If you teleport to (0.0/0.0), you land on the exact center of the coordinate system.

  • If you teleport to (0/0), you land on the middle of the block right of the Z axis and below the X axis (Yellow block), but at the coordinates (0.5/0.5)

  • If you teleport to (-1/0), you land on the middle of the block left of the Z axis and below the X axis (Green block), but at the coordinates (-0.5/0.5)

Please do not mark issues as private, unless your bug report is a security issue containing information that may compromise your server/client.

Can somebody just tell me.....is this behavior totally intended and will stay in the game for the foreseeable future?

4 more comments

This isn't a misconception. It has changed and he is asking the question of whether or not the new coordinate system is permanent.

Thank you @Ross Sullivan. It absolutely has changed. I don't like arguing with mods.....but this HAS changed since previous versions.

Nothing has changed.
Look at my screenshots and try it out.

It HAD changed. That was in version 1.7. Today, version 1.7.1 was released. this fixed the bug. I appreciate that you may have made a mistake and no offence meant. But Dustin was right, and I was having the same problem. Thank you for your help all the same. 😉

You're right.
Sorry for the noise.

Lelele

(Unassigned)

Unconfirmed

coordinate, inaccurate, negative, teleport

Minecraft 1.4.5

Retrieved