Commands/setworldspawn

From Minecraft Wiki
Jump to: navigation, search
setworldspawn
Permission level required

2‌[JE only]
1‌[BE only]

Restrictions

Cheat only‌[BE only]

Sets the world spawn.

Syntax[edit]

  • Java Edition
setworldspawn [<pos>] [<angle>]
  • Bedrock Edition
setworldspawn [spawnPoint: x y z]

Arguments[edit]

JE<pos>: block_pos
BE: spawnPoint: x y z: CommandPositionFloat

Specifies the coordinates of the world spawn. If not specified, defaults to the block position of the command's execution. In Bedrock Edition, x and z that are greater than 30,000,000 or less than -30,000,000 revert to 30,000,000 and -30,000,000 respectively. y values which are greater than 256 and less than 0 revert to 256 and 0 respectively.
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.

JE: <angle>: angle

Specified the yaw angle to spawn with. Defaults to the direction the executor is facing.
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.

Result[edit]

CommandTriggerJava EditionBedrock Edition
anythe arguments are not specified correctly Unparseable Failed
On successSets the world spawn to the specified coordinate.

Output[edit]

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
anyJava EditionOn fail000
On success111
Bedrock EditionOn fail0N/AN/A
On success1N/AN/A

Note[edit]

This command can not be used to set the world spawn in any dimension other than the Overworld. If executed in another dimension and using relative coordinates or local coordinates, the command will act as if it succeeded, but the world spawn will not be changed.[verify]

On success, spawn chunks are also changed along with the world spawn in Java Edition.

Normal spawn spreading still applies, and can be set with a gamerule.

History[edit]

Java Edition
1.7.213w43aAdded /setworldspawn.
1.16.220w29aAdded angle parameter for setting the default facing angle of a respawning player.
Pocket Edition Alpha
v0.16.0build 1Added /setworldspawn.

See also[edit]