Commands/weather
< Commands
weather
Restrictions | |
---|---|
First introduced |
Java Edition 1.4.2 (12w32a) |
Sets the weather.
Contents
Syntax[edit]
- Java Edition
weather (clear|rain|thunder) [<duration>]
- Bedrock Edition
weather <clear|rain|thunder> [duration: int]
weather query
Arguments[edit]
clear|rain|thunder
clear
– Set the weather to clear.rain
– Set the weather to rain (or snow in cold biomes).thunder
– Set the weather to a thunderstorm (or blizzard in cold biomes).
JE: <duration>
: integer
BE: duration: int
: int
- Must be a 32-bit integer number. In Java Edition, it must be between -2147483648 and 2147483647 (inclusive). Must be between 0 and 1000000 (inclusive).
- Specifies the time in seconds for the specified weather to last. If not specified, the duration defaults to 5 minutes. If 0, resets to random weather duration.
Result[edit]
Command | Trigger | Java Edition | Bedrock Edition |
---|---|---|---|
any | the arguments are not specified correctly | Unparseable | Failed |
On success | Changes the weather for the specified duration (in seconds), or outputs current weather state[Bedrock Edition only]. |
Output[edit]
Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
---|---|---|---|---|---|
any | Java Edition | On fail | 0 | 0 | 0 |
On success | 1 | 1 | the specified duration (if unspecified, defaults to 5) multiplied by 20 | ||
Bedrock Edition | On fail | 0 | N/A | N/A | |
On success | 1 | N/A | N/A |
Examples[edit]
- To get clear weather for one Minecraft day:
weather clear 1200
- To make it rain, but let it end at its own pace:
weather rain
History[edit]
Java Edition | |||||
---|---|---|---|---|---|
1.4.2 | 12w32a | Added /weather . | |||
Pocket Edition Alpha | |||||
0.16.0 | build 1 | Added /weather . |