Minecraft – setworldspawn is not spawning players to the exact place

minecraft-java-edition

I am trying to make a Minecraft map but I can't set the world spawn. I did /setworldspawn then /kill and I ended up 10 blocks away then I tried again I was still 5 blocks away.

In the map it needs to keep updating your spawn point and having it not not working correctly is not an option. In one case I set the spawn, and then ended up in the next level of my map, which is clearly not intended.

Best Answer

Try using the a repeater with a command block that states: "/spawnpoint @a[r=<size of spawn from the center, outwards>] <x> <y> <z>" This will ensure that people within the specified area (within the [r=<>] circle) will have their spawnpoints set to the coordinates and as soon as they leave the range, they can set their spawnpoint anywhere else. No pressure plates or tripwires required.