I notice when I use command blocks and /setblock, i will always have to subtract the x-value by 1 for it to go in the correct place when i check where the coordinates for the block i want to be set. is this something with the programming, is this a glitch?
1 Answer
In Minecraft, an exact integer coordinate (like 10, 64, -5) is actually on the corner between 8 different blocks. A center of a block is at 10.5, 64.5, -4.5.
When using a command such as /fill or /setblock, if a whole number is given, Minecraft automatically adds 0.5 to all of the numbers. This is because blocks must be aligned to the grid properly, so it must assume that when a user says "10" they have actually just truncated "10.5"
This isn't a programming mistake or glitch, it's because it literally can't place the block at an exact coordinate of "10".
On the F3 screen in newer versions, the "Looking at" coordinate will tell you what you actually have to type in to set the block you are looking at.
-
thanks, but this doesnt explain why i dont have to change the z value, because the z value remains the same– mdlp0716Commented Jun 24, 2014 at 17:26
-
I imagine your z is positive while your x is negative. Truncating "5.5" to "5" will still work as it returns to "5.5" when Minecraft adds 0.5. However truncating "-5.5" to "-5" will become "-4.5" when Minecraft adds 0.5.– SirBenetCommented Jun 24, 2014 at 17:29
-
1Is the same mechanic being used to display the integer coordinates on F3?– MrLemonCommented Jun 25, 2014 at 7:46