mojira.dev
MC-166839

Player Coordinates Inaccurate to Where the Player is Actually Standing

The XYZ coordinates shown in the debug menu display the player as being +1 block on the X and Z directions, leading to possible teleportation inconsistencies. The accurate coordinates are however shown in the Block coordinates shown directly below the XYZ coordinates.

The picture included shows off the locations of the coordinates and where you teleport when entering in the XYZ coordinates.

Update: After some testing I have discovered that the inaccurate coordinates only occur on the -XZ axis. The block coordinates seem to only show -1 and not -0 as the XYZ coordinates above it show. causing this odd difference. 

Linked issues

Attachments

Comments 4

The center of a block is always at the block coordinates shifted 0.5 blocks towards the x/y/z direction. Your observation is caused by the fact that adding 0.5 to a negative integer causes the part on the left of the decimal point to decrease by 1.

Huh. But it's still quite an annoyance that players end up being offset from the number they entered in if they teleported to negative coordinates.

I got this issue and think its a bug. I have an inconsistency only on my X coordinate, but noticed in the past having it on my Z or both as well. I am tinkering around with command blocks and datapacks and created an animation sequence with an item frame being teleported. I worked it out and had this annoyance only with the player, I just used the "looking at block" field to determine the correct coordinates, as it seemed to work fine. After working it out I took a break and closed Minecraft and opened it again after a while. Only to find this time the Item frame matched up with the player. Such that it says its on "TileX: -253" but placing a block at -253 would result in it being offset from the item frame. This should not happen! I am a bit worried that I'd have to fix it again after a while, as it seems inconsistent to me.

 

[media]

Redspyro99

(Unassigned)

Unconfirmed

(Unassigned)

command

1.14.4, 1.15 Pre-release 3, 1.15 Pre-release 4, 1.15 Pre-release 5, 1.15, ..., 1.15.1 Pre-release 1, 1.15.2 Pre-release 2, 1.15.2, 20w13b, 20w18a

Retrieved