These commands control the world border.
Syntax[]
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[]
<distance>
: double (in add
mode)
- Specifies the number of blocks to add to the world border diameter.
- Must be a Double-precision floating-point format number. It must be between -59,999,968 and 59,999,968 (inclusive).
<time>
: integer (in add
and set
mode)
- 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.
- Must be a 32-bit integer number. And it must be between 0 and 2147483647 (inclusive).
<pos>
: vec2
- Specifies the horizontal coordinates of the world border's center.
- Must be a two-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations. And it's X and Z should be between ±29999984 (inclusive).
<damagePerBlock>
: float
- 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. - Must be a Single-precision floating-point format number. And it must be greater than or equal to 0.0.
<distance>
: float (in damage buffer
mode)
- Specifies the distance outside the world buffer a player must be before they start taking damage. Initially set to 5.0.
- Must be a Single-precision floating-point format number. And it must be greater than or equal to 0.0.
<distance>
: double (in set
mode)
- Specifies the new diameter for the world border.
- Must be a Double-precision floating-point format number. It must be between -59,999,968 and 59,999,968 (inclusive).
<distance>
: integer (in warning distance
mode)
- 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.
- Must be a 32-bit integer number. And it must be between 0 and 2147483647 (inclusive).
<time>
: integer (in warning time
mode)
- 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.
- Must be a 32-bit integer number. And it must be between 0 and 2147483647 (inclusive).
Result[]
Command | Trigger | Java Edition |
---|---|---|
any | the arguments are not specified correctly | Unparseable |
/worldborder add ... | the size is unchanged | Failed |
the new size is less than 1.0 or greater than 59,999,968 | ||
/worldborder center ... | the center is unchanged | |
the specified X or Z is not between ±29999984. | ||
/worldborder damage amount ... | the damage amount is unchanged | |
/worldborder damage buffer ... | the damage buffer is unchanged | |
/worldborder warning distance ... | the warning distance is unchanged | |
/worldborder warning time ... | the warning time is unchanged | |
any | Otherwise | Successful |
Output[]
Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
---|---|---|---|---|---|
any | Java Edition | On fail | 0 | 0 | 0 |
/worldborder add ... | On success | 1 | 1 | the specified <distance> | |
/worldborder center ... | On success | 1 | 1 | 0 | |
/worldborder damage amount ... | On success | 1 | 1 | the specified <damagePerBlock> | |
/worldborder damage buffer ... | On success | 1 | 1 | the specified <distance> | |
/worldborder get | On success | 1 | 1 | the size of the world border after rounding to the nearest integer | |
/worldborder set ... | On success | 1 | 1 | the 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 success | 1 | 1 | the specified <distance> | |
/worldborder warning time ... | On success | 1 | 1 | the specified <time> |
Notes[]
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[]
Java Edition | |||||
---|---|---|---|---|---|
1.8 | 14w17a | Added /worldborder . | |||
14w19a | Added /worldborder damage <distance> .
| ||||
Added /worldborder warning (distance|time) . | |||||
14w26a | Added /worldborder add <distance> . | ||||
14w29a | Added /worldborder get . | ||||
1.17 | 21w17a | The arguments about world border size now require a double instead of a float.[1] | |||
The max world border size has been shrunk to 59,999,968. | |||||
1.18 | ? | The center's X and Z now must be between ±29999984 (inclusive). |