Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/worldborder: Difference between revisions

From SAS Gaming Wiki
imported>LauraFii
 
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{distinguish|Commands/immutableworld}}
{{MC/Distinguish|Commands/immutableworld}}
{{for|other uses|Border (disambiguation)}}
{{MC/For|other uses|Border (disambiguation)}}
{{exclusive|java}}
{{MC/Exclusive|java}}
{{Infobox command
{{Infobox command
|name=worldborder
|name=worldborder
Line 7: Line 7:
}}
}}


These commands control the [[Minecraft:world border]]. They only affect the world border of the dimension in which the command is executed.
These commands control the world border. They only affect the world border of the dimension in which the command is executed.


==Syntax==
==Syntax==
Line 30: Line 30:
==Arguments==
==Arguments==


{{argument|distance|double}} (in <code>add</code> mode)
{{MC/Argument|distance|double}} (in <code>add</code> mode)
: Specifies the number of blocks to add to the world border diameter.
: Specifies the number of blocks to add to the world border diameter.
: {{arg desc|je=double|min=-59,999,968|max=59,999,968}}
: {{MC/Arg desc|je=double|min=-59,999,968|max=59,999,968}}


{{argument|time|integer}} (in <code>add</code> and <code>set</code> mode)
{{MC/Argument|time|integer}} (in <code>add</code> and <code>set</code> 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.
: 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.
: {{arg desc|je=integer|min=0}}
: {{MC/Arg desc|je=integer|min=0}}


{{argument|pos|vec2}}
{{MC/Argument|pos|vec2}}
: Specifies the horizontal coordinates of the world border's center.
: Specifies the horizontal coordinates of the world border's center.
: {{arg desc|je=vec2}} And it's X and Z should be between ±29999984 (inclusive).
: {{MC/Arg desc|je=vec2}} And it's X and Z should be between ±29999984 (inclusive).


{{argument|damagePerBlock|float}}
{{MC/Argument|damagePerBlock|float}}
: Specifies the damage a player takes per second per block past the world border buffer. For example, if <code><damagePerBlock></code> 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.
: Specifies the damage a player takes per second per block past the world border buffer. For example, if <code><damagePerBlock></code> 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.
: {{arg desc|je=float|min=0.0}}
: {{MC/Arg desc|je=float|min=0.0}}


{{argument|distance|float}} (in <code>damage buffer</code> mode)
{{MC/Argument|distance|float}} (in <code>damage buffer</code> mode)
: Specifies the distance outside the world buffer a player must be before they start taking damage. Initially set to 5.0.
: Specifies the distance outside the world buffer a player must be before they start taking damage. Initially set to 5.0.
: {{arg desc|je=float|min=0.0}}
: {{MC/Arg desc|je=float|min=0.0}}


{{argument|distance|double}} (in <code>set</code> mode)
{{MC/Argument|distance|double}} (in <code>set</code> mode)
: Specifies the new diameter for the world border.
: Specifies the new diameter for the world border.
: {{arg desc|je=double|min=-59,999,968|max=59,999,968}}
: {{MC/Arg desc|je=double|min=-59,999,968|max=59,999,968}}


{{argument|distance|integer}} (in <code>warning distance</code> mode)
{{MC/Argument|distance|integer}} (in <code>warning distance</code> 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.
: 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.
: {{arg desc|je=integer|min=0}}
: {{MC/Arg desc|je=integer|min=0}}


{{argument|time|integer}} (in <code>warning time</code> mode)
{{MC/Argument|time|integer}} (in <code>warning time</code> 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.
: 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.
: {{arg desc|je=integer|min=0}}
: {{MC/Arg desc|je=integer|min=0}}


==Result==
==Result==
Line 79: Line 79:
== Output ==
== Output ==


{{Output table}}
{{MC/Output table}}
{{Output table|edition=je|On fail|0|0|0}}
{{MC/Output table|edition=je|On fail|0|0|0}}
{{Output table|cmd=/worldborder add ...|On success|1|1|the specified {{cd|<distance>}}}}
{{Output table|cmd=/worldborder add ...|On success|1|1|the specified {{MC/Cd|<distance>}}}}
{{Output table|cmd=/worldborder center ...|On success|1|1|0}}
{{MC/Output table|cmd=/worldborder center ...|On success|1|1|0}}
{{Output table|cmd=/worldborder damage amount ...|On success|1|1|the specified {{cd|<damagePerBlock>}}}}
{{Output table|cmd=/worldborder damage amount ...|On success|1|1|the specified {{MC/Cd|<damagePerBlock>}}}}
{{Output table|cmd=/worldborder damage buffer ...|On success|1|1|the specified {{cd|<distance>}}}}
{{Output table|cmd=/worldborder damage buffer ...|On success|1|1|the specified {{MC/Cd|<distance>}}}}
{{Output table|cmd=/worldborder get|On success|1|1|the size of the world border after rounding to the nearest integer}}
{{MC/Output table|cmd=/worldborder get|On success|1|1|the size of the world border after rounding to the nearest integer}}
{{Output table|cmd=/worldborder set ...|On success|1|1|the amount of change in the width of the world border<br>(a positive number means an increase, a negative number means a decrease).}}
{{MC/Output table|cmd=/worldborder set ...|On success|1|1|the amount of change in the width of the world border<br>(a positive number means an increase, a negative number means a decrease).}}
{{Output table|cmd=/worldborder warning distance ...|On success|1|1|the specified {{cd|<distance>}}}}
{{Output table|cmd=/worldborder warning distance ...|On success|1|1|the specified {{MC/Cd|<distance>}}}}
{{Output table|cmd=/worldborder warning time ...|On success|1|1|the specified {{cd|<<nowiki/>time>}}}}
{{Output table|cmd=/worldborder warning time ...|On success|1|1|the specified {{MC/Cd|<<nowiki/>time>}}}}
{{Output table}}
{{MC/Output table}}


== History ==
== History ==
{{info needed section|the update for the world border's radius that [[Minecraft:Java Edition distance effects|controlled by float replaced by double]] }}
{{MC/Info needed section|the update for the world border's radius that controlled by float replaced by double }}
{{HistoryTable
{{HistoryTable
|{{HistoryLine|java}}
|{{MC/HistoryLine|java}}
|{{HistoryLine||1.8|dev=14w17a|Added {{cmd|worldborder|link=none}}.}}
|{{HistoryLine||1.8|dev=14w17a|Added {{MC/Cmd|worldborder|link=none}}.}}
|{{HistoryLine|||dev=14w19a|Added {{cmd|worldborder damage|link=none}}.
|{{HistoryLine|||dev=14w19a|Added {{MC/Cmd|worldborder damage|link=none}}.
|Added {{cmd|worldborder warning|link=none}}.}}
|Added {{MC/Cmd|worldborder warning|link=none}}.}}
|{{HistoryLine|||dev=14w26a|Added {{cmd|worldborder add|link=none}}.}}
|{{HistoryLine|||dev=14w26a|Added {{MC/Cmd|worldborder add|link=none}}.}}
|{{HistoryLine|||dev=14w29a|Added {{cmd|worldborder get|link=none}}.}}
|{{HistoryLine|||dev=14w29a|Added {{MC/Cmd|worldborder get|link=none}}.}}
|{{HistoryLine||1.17|dev=21w17a|The arguments about world border size now require a double instead of a float.<ref>{{bug|MC-187664}}</ref>
|{{HistoryLine||1.17|dev=21w17a|The arguments about world border size now require a double instead of a float.<ref>{{bug|MC-187664}}</ref>
|The max world border size has been shrunk to 59,999,968 from 60,000,000.}}
|The max world border size has been shrunk to 59,999,968 from 60,000,000.}}
|{{HistoryLine||1.18|dev=?|The center's X and Z now must be between ±29999984 (inclusive).}}
|{{MC/HistoryLine||1.18|dev=?|The center's X and Z now must be between ±29999984 (inclusive).}}
|{{HistoryLine||1.21.9|dev=25w36a|The command now only affects the world border of the [[Minecraft:dimension]] it is executed in.}}
|{{MC/HistoryLine||1.21.9|dev=25w36a|The command now only affects the world border of the [[Minecraft:dimension]] it is executed in.}}
|{{HistoryLine||1.21.11|dev=25w43a|The {{cd|time}} argument is now given in ticks instead of seconds.}}
|{{HistoryLine||1.21.11|dev=25w43a|The {{MC/Cd|time}} argument is now given in ticks instead of seconds.}}
|{{HistoryLine|||dev=25w44a|The {{cd|time}} argument for setting the size can now also specify seconds or in-game days using an {{cd|s}} or {{cd|d}} suffix.|The {{cd|time}} argument for setting the warning distance now specifies ticks by default but can also specify seconds or in-game days using an {{cd|s}} or {{cd|d}} suffix.}}
|{{HistoryLine|||dev=25w44a|The {{MC/Cd|time}} argument for setting the size can now also specify seconds or in-game days using an {{MC/Cd|s}} or {{MC/Cd|d}} suffix.|The {{MC/Cd|time}} argument for setting the warning distance now specifies ticks by default but can also specify seconds or in-game days using an {{MC/Cd|s}} or {{MC/Cd|d}} suffix.}}
}}
}}


== References ==
== References ==
{{reflist}}
{{MC/Reflist}}


== Navigation ==
== Navigation ==
{{Navbox commands}}
{{MC/Navbox commands}}


[[Minecraft:de:Befehl/worldborder]]
de:Befehl/worldborder
[[Minecraft:es:Comandos/worldborder]]
es:Comandos/worldborder
[[Minecraft:ja:コマンド/worldborder]]
ja:コマンド/worldborder
[[Minecraft:pt:Comandos/worldborder]]
pt:Comandos/worldborder
[[Minecraft:ru:Команды консоли/worldborder]]
ru:Команды консоли/worldborder
[[Minecraft:zh:命令/worldborder]]
zh:命令/worldborder

Latest revision as of 20:15, 9 April 2026

Template:Hatnote Template:Hatnote Script error: No such module "Exclusive". Template:Infobox command

These commands control the world border. They only affect the world border of the dimension in which the command is executed.

Syntax

worldborder add <distance> [<time>]

Increases or decreases the world border size. Optionally, a <time> may be specified such that the border grows or shrinks from the previous size to that being set over the specified time in seconds. The border still grows or shrinks and the animation displays even if the game is paused. If <time> is not specified, the world border changes immediately. Initial size is 59,999,968.

worldborder center <pos>

Recenters the world border. Sets the center of the world border to the specified coordinates. Initial center is (0, 0).

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 outside from the world border buffer distance. Initial value is 0.2 damage per second per block.

worldborder damage buffer <distance>

Sets the world border buffer distance to the specified value. Players won't take damage until they move outside this distance from the world border. Initial value is 5 blocks.

worldborder get

Gets the current size of the world border.

worldborder set <distance> [<time>]

Sets the world border region size with the specified distance in blocks as the width and length. Optionally, a <time> may be specified such that the border grows or shrinks from the previous size to that being set over the specified time in seconds. The border still grows or shrinks and the animation displays even if the game is paused. If <time> is not specified, the world border changes immediately. Initial size is 59,999,968.

worldborder warning distance <distance>

Sets the world border warning distance to the specified value. Causes the screen to be tinted red when the player is within the specified number of blocks from the world border. Initial value is 5 blocks. The tint does not display if the user is using fast graphics.

worldborder warning time <time>

Sets the world border warning time to the specified value. Causes the screen to be tinted red when a contracting world border reaches the player within the specified time. Initial value is 15 seconds. The tint does not display if the user is using fast graphics.

Arguments

<distance>: double (in add mode)

Specifies the number of blocks to add to the world border diameter.
{{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|double}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}

<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.
{{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}

<pos>: vec2

Specifies the horizontal coordinates of the world border's center.
{{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|vec2}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}} 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.
{{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|float}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}

<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.
{{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|float}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}

<distance>: double (in set mode)

Specifies the new diameter for the world border.
{{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|double}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}

<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.
{{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}

<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.
{{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|0}}{{#vardefine:output3-{{#var:output-table-lines}}|0}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|je}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} Template:Output table {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|0}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|/worldborder center ...}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}} Template:Output table Template:Output table {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the size of the world border after rounding to the nearest integer}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|/worldborder get}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the amount of change in the width of the world border
(a positive number means an increase, a negative number means a decrease).}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|/worldborder set ...}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}} Template:Output table Template:Output table

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}

History

  1. REDIRECT Template:Incomplete section

Template:HistoryTable

References

<references group="">

 </references>

Navigation

All editions
Removed
Template:El only
Debug
Removed
Template:Els only
Template:El only
Removed
Template:El only
Removed
Template:Els only
Removed
Joke
Related

de:Befehl/worldborder es:Comandos/worldborder ja:コマンド/worldborder pt:Comandos/worldborder ru:Команды консоли/worldborder zh:命令/worldborder