Minecraft:Commands/weather: Difference between revisions
More actions
imported>MinecraftBedrockPlayer7 mNo edit summary |
Fix template calls: add MC/ prefix |
||
| (One intermediate revision by the same user not shown) | |||
| Line 4: | Line 4: | ||
* 2 {{only|java|short=1}} | * 2 {{only|java|short=1}} | ||
* 1 {{only|bedrock|short=1}} | * 1 {{only|bedrock|short=1}} | ||
| others = | | others = Cheat only{{only|bedrock|short=1}} | ||
}} | }} | ||
Sets the | Sets the weather. {{MC/In|bedrock}}, it can also be used to get current weather. | ||
==Syntax== | ==Syntax== | ||
| Line 22: | Line 22: | ||
<code>clear|rain|thunder</code> | <code>clear|rain|thunder</code> | ||
:* <code>clear</code> – Set the weather to clear. And it will turn into thunder after the clear weather ends. | :* <code>clear</code> – Set the weather to clear. And it will turn into thunder after the clear weather ends. | ||
:* <code>rain</code> – Set the weather to | :* <code>rain</code> – Set the weather to rain (or snowfall in cold biomes). And it will turn into clear after the rain ends. | ||
:* <code>thunder</code> – Set the weather to a | :* <code>thunder</code> – Set the weather to a thunderstorm (or blizzard in cold biomes). And it will turn into clear after the thunder ends. | ||
{{ | {{MC/Argument|duration|time|duration: int|int}} | ||
: Specifies the time for the specified weather to last. | : Specifies the time for the specified weather to last. | ||
: {{ | : {{MC/In|java}}, if not specified, the duration defaults to a random value. The range of the random value depends on the specified weather type: | ||
:* <code>clear</code> - 12000 to 180000 ticks (both inclusive). i.e. 10 to 150 minutes (both inclusive). | :* <code>clear</code> - 12000 to 180000 ticks (both inclusive). i.e. 10 to 150 minutes (both inclusive). | ||
:* <code>rain</code> - 12000 to 24000 ticks (both inclusive). i.e. 10 to 20 minutes (both inclusive). | :* <code>rain</code> - 12000 to 24000 ticks (both inclusive). i.e. 10 to 20 minutes (both inclusive). | ||
:* <code>thunder</code> - 3600 to 15600 ticks (both inclusive). i.e. 3 to 13 minutes (both inclusive). | :* <code>thunder</code> - 3600 to 15600 ticks (both inclusive). i.e. 3 to 13 minutes (both inclusive). | ||
: {{ | : {{MC/In|bedrock}}, the time is specified in game ticks. If 0 or not specified, the duration defaults to a random value between 300 seconds and 900 seconds. | ||
: {{ | : {{MC/Arg desc|je=time|min=1|be=int}} And it should be between 0 and 1000000 (inclusive). | ||
==Result== | ==Result== | ||
| Line 43: | Line 43: | ||
== Output == | == Output == | ||
{{Output table}} | {{MC/Output table}} | ||
{{Output table|edition=je|On success|1|1|the specified duration (if unspecified, defaults to -1)}} | {{MC/Output table|edition=je|On success|1|1|the specified duration (if unspecified, defaults to -1)}} | ||
{{Output table|edition=be|On fail|0}} | {{MC/Output table|edition=be|On fail|0}} | ||
{{Output table|On success|1}} | {{MC/Output table|On success|1}} | ||
{{Output table}} | {{MC/Output table}} | ||
==Examples== | ==Examples== | ||
| Line 58: | Line 58: | ||
=== ''Java Edition'' === | === ''Java Edition'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|java}} | |{{MC/HistoryLine|java}} | ||
|{{HistoryLine||1.4.2|dev=12w32a|Added {{ | |{{HistoryLine||1.4.2|dev=12w32a|Added {{MC/Cmd|weather|link=none}}.}} | ||
|{{HistoryLine||1.13|dev=17w45a|If the player doesn't specify a time, it now defaults to 5 minutes (previously random).}} | |{{MC/HistoryLine||1.13|dev=17w45a|If the player doesn't specify a time, it now defaults to 5 minutes (previously random).}} | ||
|{{HistoryLine||1.19.4|dev=22w03a|Now {{ | |{{HistoryLine||1.19.4|dev=22w03a|Now {{MC/Cmd|weather|link=none}} uses time [[Minecraft:argument types]] rather than integer. | ||
|Before this snapshot, the integer argument specifies a time in seconds. If not specified, the duration defaults to 5 minutes. If 0, resets to random weather duration.}} | |Before this snapshot, the integer argument specifies a time in seconds. If not specified, the duration defaults to 5 minutes. If 0, resets to random weather duration.}} | ||
|{{HistoryLine||1.20.5|dev=24w11a|Now works in non-overworld dimensions.}} | |{{MC/HistoryLine||1.20.5|dev=24w11a|Now works in non-overworld dimensions.}} | ||
}} | }} | ||
=== ''Bedrock Edition'' === | === ''Bedrock Edition'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|pocket alpha}} | |{{MC/HistoryLine|pocket alpha}} | ||
|{{HistoryLine||v0.16.0|dev=build 1|Added {{ | |{{HistoryLine||v0.16.0|dev=build 1|Added {{MC/Cmd|weather|link=none}}.}} | ||
|{{HistoryLine|bedrock}} | |{{MC/HistoryLine|bedrock}} | ||
|{{HistoryLine||1.18.30|dev=?|The <code>duration: int</code> argument is now in ticks instead of seconds.}} | |{{MC/HistoryLine||1.18.30|dev=?|The <code>duration: int</code> argument is now in ticks instead of seconds.}} | ||
}} | }} | ||
| Line 79: | Line 79: | ||
== Navigation == | == Navigation == | ||
{{Navbox commands}} | {{MC/Navbox commands}} | ||
de:Befehl/weather | |||
es:Comandos/weather | |||
ja:コマンド/weather | |||
lzh:令/weather | |||
pt:Comandos/weather | |||
ru:Команды консоли/weather | |||
uk:Команди консолі/weather | |||
zh:命令/weather | |||
Latest revision as of 20:15, 9 April 2026
Sets the weather. in Template:Editions, it can also be used to get current weather.
Syntax
- Java Edition
weather (clear|rain|thunder) [<duration>]
- Bedrock Edition
weather <clear|rain|thunder> [duration: int]weather query
Arguments
clear|rain|thunder
clear– Set the weather to clear. And it will turn into thunder after the clear weather ends.rain– Set the weather to rain (or snowfall in cold biomes). And it will turn into clear after the rain ends.thunder– Set the weather to a thunderstorm (or blizzard in cold biomes). And it will turn into clear after the thunder ends.
Template:El: <duration>: time
Template:El: duration: int: int
- Specifies the time for the specified weather to last.
- in Template:Editions, if not specified, the duration defaults to a random value. The range of the random value depends on the specified weather type:
clear- 12000 to 180000 ticks (both inclusive). i.e. 10 to 150 minutes (both inclusive).rain- 12000 to 24000 ticks (both inclusive). i.e. 10 to 20 minutes (both inclusive).thunder- 3600 to 15600 ticks (both inclusive). i.e. 3 to 13 minutes (both inclusive).
- in Template:Editions, the time is specified in game ticks. If 0 or not specified, the duration defaults to a random value between 300 seconds and 900 seconds.
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|time}}{{#vardefine:be-arg|integer}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}} And it should be between 0 and 1000000 (inclusive).
Result
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 success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the specified duration (if unspecified, defaults to -1)}}{{#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}} {{#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}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#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}}|be}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#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}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
{{#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|}}
Examples
- To get clear weather for one Minecraft day:
/weather clear 24000
- To make it rain, but let it end at its own pace:
/weather rain
History
Java Edition
Bedrock Edition
External links
de:Befehl/weather es:Comandos/weather ja:コマンド/weather lzh:令/weather pt:Comandos/weather ru:Команды консоли/weather uk:Команди консолі/weather zh:命令/weather