Commands/weather

From Minecraft Wiki
Jump to: navigation, search
weather
Restrictions

Operator

First introduced

1.4.2 (12w32a)
PE Alpha 0.16.0 (PE Alpha 0.16.0 build 1)

Sets the weather.

Syntax
  • Java Edition
weather <clear|rain|thunder> [duration]
  • Pocket Edition
weather <type: string> [duration: int]
Arguments
clear|rain|thunder (PE: type: string)
  • 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 a thunder snowstorm in cold biomes).
duration (PE: duration: int) (optional)
Specifies the time in seconds for the specified weather to last. Must be between 1 and 1,000,000 (inclusive, without the commas). If duration is omitted, the duration will be set between 6,000 and 18,000 ticks.
Result
Fails if the arguments are not specified correctly.
On success, changes the weather for the specified duration (in seconds).
Examples
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