Commands/worldborder

From Minecraft Wiki
Jump to: navigation, search
Information icon.svg
This feature is exclusive to Java Edition.
worldborder
Restrictions

Operator

First introduced

Java Edition 1.8 (14w17a)

These commands control the world border.

Syntax[edit]

worldborder add <distance> [<time>]

Increases or decreases the world border diameter.

worldborder center <pos>

Recenters the world boundary.

worldborder damage amount <damagePerBlock>

Sets the world border damage amount to the specified value. Any player outside the world border buffer takes this amount of damage per second per block past the world border buffer distance.

worldborder damage buffer <distance>

Sets the world border buffer distance to the specified value. Players won't take damage until they move past this distance from the world border.

worldborder get

Returns the current world border diameter.

worldborder set <distance> [<time>]

Sets the world border diameter.

worldborder warning distance <distance>

Sets the world border warning distance to the specified value.

worldborder warning time <time>

Sets the world border warning time to the specified value.

Arguments[edit]

<distance>: float (in add mode)

Must be a Single-precision floating-point format number. And it must be between -60,000,000 and 60,000,000 (inclusive).
Specifies the number of blocks to add to the world border diameter.

<time>: integer (in add and set mode)

Must be a 32-bit integer number. And it must be between 0 and 2147483647 (inclusive).
Specifies the number of seconds it should take for the world border to move from its current diameter to the new diameter. If not specified, defaults to 0.

<pos>: vec2

Must be a two-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.
Specifies the horizontal coordinates of the world border's center.

<damagePerBlock>: float

Must be a Single-precision floating-point format number. And it must be greater than or equal to 0.0.
Specifies the damage a player takes per second per block past the world border buffer. For example, if <damagePerBlock> is 0.1, a player 5 blocks outside the world border buffer takes 0.5 damage per second (damage less than half a heart might not change the visual health display, but still accumulates). Initially set to 0.2.

<distance>: float (in damage buffer mode)

Must be a Single-precision floating-point format number. And it must be greater than or equal to 0.0.
Specifies the distance outside the world buffer a player must be before they start taking damage. Initially set to 5.0.

<distance>: float (in set mode)

Must be a Single-precision floating-point format number. And it must be between -30,000,000 and 30,000,000 (inclusive).
Specifies the new diameter for the world border.

<distance>: integer (in warning distance mode)

Must be a Single-precision floating-point format number. And it must be greater than or equal to 0.
Specifies the distance from the world border at which players begins to see a visual warning of the world border's proximity. Initially set to 5.

<time>: integer (in warning time mode)

Must be a 32-bit integer number. And it must be between 0 and 2147483647 (inclusive).
Specifies the number of seconds that a player begins to see a visual warning before a moving world border passes their position. Initially set to 15.

Result[edit]

CommandTriggerJava Edition
anythe arguments are not specified correctly Unparseable
/worldborder add ...
/worldborder set ...
if the size is unchanged Failed
if the new size is less than 1.0 or greater than 60,000,000
/worldborder center ...if the center is unchanged
/worldborder damage amount ...if the damage amount is unchanged
/worldborder damage buffer ...if the damage buffer is unchanged
/worldborder warning distance ...if the warning distance is unchanged
/worldborder warning time ...if the warning time is unchanged
anyOn successManages the world border.

Output[edit]

CommandEditionSituationSuccess Count/execute store succeess .../execute store result ...
anyJava EditionOn fail000
/worldborder add ...On success11the specified <distance>
/worldborder center ...On success110
/worldborder damage amount ...On success11the specified <amagePerBlock>
/worldborder damage buffer ...On success11the specified <distance>
/worldborder getOn success11the size of the world border after rounding to the nearest integer
/worldborder set ...On success11the amount of change in the width of the world border
(a positive number means an increase, a negative number means a decrease).
/worldborder warning distance ...On success11the specified <distance>
/worldborder warning time ...On success11the specified <time>

Notes[edit]

In add or set mode, if successful, the world border begins changing its diameter by the specified amount. If diameter is increasing, the world border turns green; if decreasing, the world border turns red. If <time> is 0 or unspecified, the change occurs immediately; otherwise the change proceeds at a rate of (Distance difference/2)/time blocks per second.

In center mode, if successful, the center of the world border immediately moves to the specified coordinates.

History[edit]

Java Edition
1.814w17aAdded /worldborder.
14w19aAdded /worldborder damage.
Added /worldborder warning.
14w26aAdded /worldborder add.
14w29aAdded /worldborder get.