simple-utilities-mod icon indicating copy to clipboard operation
simple-utilities-mod copied to clipboard

Mod is giving wrong coordinates.

Open husnain-majeed opened this issue 2 years ago • 4 comments

I have noticed that on the Z axis the mod says that two blocks are both at a position of Z : 0. This makes all the Z cords wrong as it offsets everything by 1.

using minecraft 1.19.2 & mod ver 2.5.2 , have other mods.

image

image (cords for both blocks)

husnain-majeed avatar Nov 13 '22 12:11 husnain-majeed

First, the top left shows the player's current position, not blocks. Second, in the below image, both the green blocks have the same Z-axis value, so I'm trying to figure out what the problem is you are describing. image

SoRadGaming avatar Jan 11 '23 01:01 SoRadGaming

I know the top left shows my position and not the blocks in the screenshot, however, the problem I am stating happens when I am on both blocks show, the screenshot is just so you can visualize the problem.

You misunderstand the blocks are not on the same Z Axis as I am looking West therefore when I move left or right I am moving on the Z axis so the Z increments by 1 per block (as it does on your mod and in-game coordinates) except when you get to 0 they in your mod there are two blocks with the coordinate Z of 0, this means all coordinates after 0 are wrong by - 1.

Both those dirt blocks are Z : 0 in your mod when moving left to right while the left should be 0 and the right should be -1

Hope this clears things up, if not ill try to take some screenshots

husnain-majeed avatar Jan 11 '23 11:01 husnain-majeed

Yeah just tested it; it's offset by one in X, Y and Z axes. It's because the code only grabs the first value of the axis. Simple to fix; thanks for the clarification.

SoRadGaming avatar Jan 11 '23 12:01 SoRadGaming

Happy to help !

husnain-majeed avatar Jan 11 '23 12:01 husnain-majeed