Hello, I am trying to make my first data pack, but I am already running into issues. The biggest issue I have is understanding how the execute command works.
I need to get the position of the player, make it a whole number (round it), and then add 0.5 to the X, Y, and Z values. So for example, if I am standing on 246.22, 67.00, -178.31, I want it to first round all the values (doesn't matter if it rounds up, rounds down, or rounds to the nearest whole number), so 246, 67, -179, and then add 0.5, making the final result 246.5, 67.5, -178.5.
Finally, with this value I need to test each axis independently to see if the player is behind this point, or after. So bascially I want to check if the player's X is < 246.5 and if it is execute a command, if the player's Y is < 67.5 and if it is execute a command and so on...
Is there a way to do this? I don't know if this is better to be done in a data pack or should I try to make a mod, but mod seems very hard. Please help. I am on these forums first time sorry if I posted in wrong place. Pls help me