Hey guys! I've use the execute if command so much I thought I knew it but I just discovered something about it that doesn't seem to make sense to me. I have a command that is supposed to detect when a player reaches one block from a specific block.
execute if @a[x=8,y=8,z=8,distance=..1] run setblock blah blah blah
I've done this a million times, but never from the position of the player going vertically which is how I caught the problem. I've noticed that the command will only trigger if the player is one block to the west or one to the north. Standing one block away on the south, east, up, down sides of the block...nothing. This doesn't seem right. Anybody know what's up with that? I assume this has something to do with the micro coords of a block but I thought that you had to use whole values for x y z in the case of an "if" case and assumed it would choose the dead center of the block or each of it sides.
Hey guys! I've use the execute if command so much I thought I knew it but I just discovered something about it that doesn't seem to make sense to me. I have a command that is supposed to detect when a player reaches one block from a specific block.
execute if @a[x=8,y=8,z=8,distance=..1] run setblock blah blah blah
I've done this a million times, but never from the position of the player going vertically which is how I caught the problem. I've noticed that the command will only trigger if the player is one block to the west or one to the north. Standing one block away on the south, east, up, down sides of the block...nothing. This doesn't seem right. Anybody know what's up with that? I assume this has something to do with the micro coords of a block but I thought that you had to use whole values for x y z in the case of an "if" case and assumed it would choose the dead center of the block or each of it sides.
Try using 8.0 instead of 8. It might default your value to 8.5.
Thanks for the suggestion. I ended up changing the value to 2 and that yielded the desired result. It's weird because minecraft has other weird positioning rules that I can't seem to figure out too. I've tried positioning invis slimes as door blockers with specific double or float values and it just seems to place the slime either smack dab in the center or half way. I can't seem to get any more precise than that and it's pretty annoying at times.
Hey guys! I've use the execute if command so much I thought I knew it but I just discovered something about it that doesn't seem to make sense to me. I have a command that is supposed to detect when a player reaches one block from a specific block.
execute if @a[x=8,y=8,z=8,distance=..1] run setblock blah blah blah
I've done this a million times, but never from the position of the player going vertically which is how I caught the problem. I've noticed that the command will only trigger if the player is one block to the west or one to the north. Standing one block away on the south, east, up, down sides of the block...nothing. This doesn't seem right. Anybody know what's up with that? I assume this has something to do with the micro coords of a block but I thought that you had to use whole values for x y z in the case of an "if" case and assumed it would choose the dead center of the block or each of it sides.
Try using 8.0 instead of 8. It might default your value to 8.5.
Thanks for the suggestion. I ended up changing the value to 2 and that yielded the desired result. It's weird because minecraft has other weird positioning rules that I can't seem to figure out too. I've tried positioning invis slimes as door blockers with specific double or float values and it just seems to place the slime either smack dab in the center or half way. I can't seem to get any more precise than that and it's pretty annoying at times.