-
Bug
-
Resolution: Fixed
-
1.17.10, 1.16.221 Hotfix, 1.17.40
-
None
-
Confirmed
-
Windows
-
654822
The /spawnpoint command always sets the player's spawn point to integer coordinates. That centers the player on the intersection of four blocks. As a result, blocks to the north or west of the player spawnpoint can cause the player's position to be offset away from the intended respawn block when respawning. This can make it impossible to set a reliable player respawn points precisely. Moreover, it is not possible to work around this by using fractional coordinates because although the game accepts fractional coordinates as input, it truncates them to integers when saving the spawn point. It is also not possible to workaround by setting respawn radius to 0 because the problem is not the block check.
- Create a flat world
- /spawnpoint 0 4 -20
- Place solid blocks 2-high at 0, 4, -19; 0, 4, -21; 1 4 -20; and -1 4 -20.
- Change to survival mode.
- /kill @s
Expected result
You respawn at 0 4 -20, inside of 1 x 1 space surround by blocks..
Actual result
You respawn at -1, 4, -21, pushed out to the northwest by the blocks. Note that if you try this with a spawnpoint at 0, 4, 0 you will not see the bug because the player is pushed southeast instead of northwest from 0, Y, 0.
If you are trying to use the spawnpoint command, it will not work consistently if you are spawning in a 1x1 block space enclosed by walls. For me, two consistent errors are the following coordinates: 0, 20, -20; 0, 20, 20. (Maybe it just needs to spawn in the center of the block?) You spawn just on the corner and then get pushed out.
There are no corners, and I have the spawn set to the coords of that pressure plate. (0, 20, -20)
- relates to
-
MCPE-175620 worldspawn is off center when RespawnRadius is 0
- Reopened