'XY coords to XZ positive/negative coords like minecraft
I recently came up with the idea to color my minecraft map with a picture of colors. So this is how I created a picture with different colors in paint, then in my plugin - each color means a different block I made forums that take each color from XY and save it to the map key - (Point object with X and Y variables) and as a color value but I encountered a problem - blocks are generated only in one corner because the points in the picture are only positive and the Minecraft map consists of positive and negative coordinates. Now I have a question, does anyone have any idea to change these points to positive and negative, for example I have a 51x51 px picture so for x: 0 z: 0 there must be a color from the point x: 26 z: 26 etc. Thank you for any help I have tried everything, sometimes it seems to me that I had a good idea and it will be a breakthrough, but after a while one big XD comes out of it
Solution 1:[1]
Sorry if i did understand you wrong, but you have the problem that the blocks are placed on wrong positions if you try to put the converted image on a position with negative x or z value?
Solution 2:[2]
Maybe make a separate coord system that you come up with
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | VinceG |
| Solution 2 | bananass4life |
