Minecraft:Commands/weather: Difference between revisions
From SAS Gaming Wiki
More actions
Fix template calls: add MC/ prefix |
Sync: updated from Minecraft |
||
| 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 = Cheat only{{only|bedrock|short=1}} | | others = [[Minecraft:Cheat]] only{{only|bedrock|short=1}} | ||
}} | }} | ||
Sets the weather. {{ | Sets the [[Minecraft:weather]]. {{IN|bedrock}}, it can also be used to get current weather. | ||
==Syntax== | ==Syntax== | ||
| Line 21: | Line 21: | ||
<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. | :* {{EnvSprite|cloud}} <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 rain (or snowfall in cold biomes). And it will turn into clear after the rain ends. | :* {{EnvSprite|rain}} <code>rain</code> – Set the weather to [[Minecraft:rain]] (or [[Minecraft:snowfall]] in cold [[Minecraft:biomes]]). And it will turn into clear after the rain ends. | ||
:* <code>thunder</code> – Set the weather to a thunderstorm (or blizzard in cold biomes). And it will turn into clear after the thunder ends. | :* {{EnvSprite|weather}} <code>thunder</code> – Set the weather to a [[Minecraft:thunderstorm]] (or blizzard in cold biomes). And it will turn into clear after the thunder ends. | ||
{{ | {{argument|duration|time|duration: int|int}} | ||
: Specifies the time for the specified weather to last. | : Specifies the time for the specified weather to last. | ||
: {{ | : {{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). | ||
: {{ | : {{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. | ||
: {{ | : {{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}} | ||
{{ | {{Output table|edition=je|On success|1|1|the specified duration (if unspecified, defaults to -1)}} | ||
{{ | {{Output table|edition=be|On fail|0}} | ||
{{ | {{Output table|On success|1}} | ||
{{ | {{Output table}} | ||
==Examples== | ==Examples== | ||
| Line 58: | Line 58: | ||
=== ''Java Edition'' === | === ''Java Edition'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{ | |{{HistoryLine|java}} | ||
|{{HistoryLine||1.4.2|dev=12w32a|Added {{ | |{{HistoryLine||1.4.2|dev=12w32a|Added {{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).}} | ||
|{{HistoryLine||1.19.4|dev=22w03a|Now {{ | |{{HistoryLine||1.19.4|dev=22w03a|Now {{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.}} | ||
}} | }} | ||
=== ''Bedrock Edition'' === | === ''Bedrock Edition'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{ | |{{HistoryLine|pocket alpha}} | ||
|{{HistoryLine||v0.16.0|dev=build 1|Added {{ | |{{HistoryLine||v0.16.0|dev=build 1|Added {{cmd|weather|link=none}}.}} | ||
|{{ | |{{HistoryLine|bedrock}} | ||
|{{ | |{{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}} | ||
de:Befehl/weather | [[Minecraft:de:Befehl/weather]] | ||
es:Comandos/weather | [[Minecraft:es:Comandos/weather]] | ||
ja:コマンド/weather | [[Minecraft:ja:コマンド/weather]] | ||
lzh:令/weather | [[Minecraft:lzh:令/weather]] | ||
pt:Comandos/weather | [[Minecraft:pt:Comandos/weather]] | ||
ru:Команды консоли/weather | [[Minecraft:ru:Команды консоли/weather]] | ||
uk:Команди консолі/weather | [[Minecraft:uk:Команди консолі/weather]] | ||
zh:命令/weather | [[Minecraft:zh:命令/weather]] | ||
Revision as of 11:06, 14 June 2026
Sets the Minecraft:weather. Template:IN, 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
- Template:EnvSprite
clear– Set the weather to clear. And it will turn into thunder after the clear weather ends. - Template:EnvSprite
rain– Set the weather to Minecraft:rain (or Minecraft:snowfall in cold Minecraft:biomes). And it will turn into clear after the rain ends. - Template:EnvSprite
thunder– Set the weather to a Minecraft:thunderstorm (or blizzard in cold biomes). And it will turn into clear after the thunder ends.
- Template:EnvSprite
- Specifies the time for the specified weather to last.
- Template:IN, 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).
- Template:IN, 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.
- Template:Arg desc 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
Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table
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
Minecraft:de:Befehl/weather Minecraft:es:Comandos/weather Minecraft:ja:コマンド/weather Minecraft:lzh:令/weather Minecraft:pt:Comandos/weather Minecraft:ru:Команды консоли/weather Minecraft:uk:Команди консолі/weather Minecraft:zh:命令/weather