Sets the world spawn.
- Java Edition
setworldspawn [<pos>] [<angle>]
- Bedrock Edition
setworldspawn [spawnPoint: x y z]
- In Java Edition, it must be a block position composed of <x>, <y> and <z>, each of which must be an integer or tilde and caret notation.
- In Bedrock Edition, must be a three-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.
- Specifies the coordinates of the world spawn. If not specified, defaults to the block position of the command's execution. In Bedrock Edition,
zthat are greater than 30,000,000 or less than -30,000,000 revert to 30,000,000 and -30,000,000 respectively.
yvalues which are greater than 256 and less than 0 revert to 256 and 0 respectively.
- Must be a yaw angle, measured in degrees with float number. -180.0 for due north, -90.0 for due east, 0.0 for due south, 90.0 for due west, to 179.9 for just west of due north, before wrapping back around to -180.0. Tilde notation can be used to specify a rotation relative to the executor's yaw angle.
- Specified the yaw angle to spawn with. Defaults to the direction the executor is facing.
|Command||Trigger||Java Edition||Bedrock Edition|
|any||the arguments are not specified correctly||Unparseable||Failed|
|On success||Sets the world spawn to the specified coordinate.|
|any||Java Edition||On fail||0||0||0|
|Bedrock Edition||On fail||0||N/A||N/A|
Normal spawn spreading still applies, and can be set with a gamerule.
|Pocket Edition Alpha|
|0.16.0||build 1||Added |