mojira.dev
MC-36602

Commands with coordinates are NOW offset -1 x and/or z from where it should be (at negative X and Z coordinates)

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]

This bug is marked as resolved on the bug tracker but IT IS NOT. The offset is now 1 rather than 2.

To replicate:

Place a command block and type

setblock -5 80 -5 minecraft:stone

Power the command block and you should see a stone block appear at -4 80 -4

This bug hasn't been fixed, the offset is just slightly less.

Linked issues

MC-37836 /setblock X-co-ordinates are off Resolved MC-41812 Issue with coordinate and /setblock command. Resolved MC-42312 range with command blocks subtily messed up Resolved MC-44267 The Debug Screen (f3) Resolved MC-45107 Fence Spawning over one on x coord when putting command in command block Resolved

Attachments

Comments 13

However /tp is broken with negative coordinates, I think you are mixing things up 😃

are you looking in the coordinates inside the brackets or the ones with decimals. i.e:

x: -46.43973569734 (-47)
y: 69
z: -67.24837569238 (-68)

for x & z you have to look at the coordinates in the brackets, as those are the correct ones for blocks.

That's a misconception between grid lines and block coordinates, go to the origin of a world and try placing blocks at 0/0, 0/-1 etc. , see screenshot

i just look at photo and see it
they should keep id number for people with learning problem like me.
i cant Reproduce but i do see there maybe problem with commandblock not summon (mob) with name showing. i not sure if the spawning way off or what the deal. i not sure what to put it under.

3 more comments

I laughed the first time I noticed that Minecraft Xbox360 had two zeros in the coordinates. 1, 0, 0, -1. I walked back and forth over that area a few times unable to believe what my eyes were telling me. Them fixing that is why the limits of xbox worlds are 431 and -432 now instead of the positive and negative of the same number.

I can sort of understand how this bug works:
If you check, you will find that there is a 0 and a -0 for both x and z axises. I believe this was intentional. If the whole minecraft world is made out of 16x16 chunks, there could be no exact middle block of the world. Only two rows of blocks at the middle of the entire world. When a command targets a negative coordinate, the coding recgonizes -0 as the same block as 0, and therefore there is a offest of one block. Mojang should fix this by subreacting one to a negative coordinate when a command is entered. For exaple the player enters: "setblock -1 64 -1 minecraft:stone". The system would subtract one, so: "setblock -2 64 -2 minecraft:stone" would be executed. But the system doesn't recgonize -0, so the stone block would end up at -1 64 -1

Kumasasa

Are you trying to say this is not a bug? Try this command /fill -0 64 -0 dirt

guess what, it does the same thing as this command /fill 0 64 0 dirt

The commands are clearly not reading coordinates right. It has nothing to do with math. it's about names of blocks. I could call a block 0.2G0 if i wanted it doesn't matter if 0 can't be negative, G is not a number, and a number after a decimal can't end in 0, it's just a matter of characters that represent a block. So the fact remains that -0 is used to name blocks but the /command has not been told to read -0 as part of the block name. Either fix the command or fix the coordinate because they do not coincide.

Yes, I get your point.
In fact the game could've been made to have blocks named +0 and -0, but it wasn't. Thus it's still not a bug and the block placement system is either intended by the developers or working by design.

Sparks

Erik Broes

Unconfirmed

command, offset

Minecraft 1.7

Retrieved