
Command
/weather
Sets the weather to clear, rain or thunderstorm, optionally for a chosen length of time.
| /weather (clear|rain|thunder) [<duration>] |
| Argument | Kind of value | What to type |
|---|---|---|
| <duration> | Time | How long the weather lasts, in ticks or with a unit (t, s, d). Minimum 1 tick. If left out, a random length is chosen. At least 1. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Server operators, players in a singleplayer or LAN world with cheats enabled, the server console, command blocks and functions. |
| Result | Reports "Set the weather to clear", "Set the weather to rain" or "Set the weather to rain and thunder". Returns the duration that was given, in ticks, or -1 if no duration was given. |
| Weather types | clear stops rain and thunder, rain starts rain without thunder, and thunder starts rain with thunder. |
| Duration | The duration is how long the chosen weather lasts before the normal weather cycle takes over again. It is given in ticks, or with a unit: t for ticks, s for seconds (20 ticks) and d for in-game days (24000 ticks). The minimum is 1 tick. |
| No duration | Without a duration the game picks a random length: 12000 to 180000 ticks (10 to 150 minutes) for clear, 12000 to 24000 ticks (10 to 20 minutes) for rain, and 3600 to 15600 ticks (3 to 13 minutes) for thunder. |
/weather clearClears the weather for a random time between 10 and 150 minutes.
/weather rainStarts rain for a random time between 10 and 20 minutes.
/weather thunderStarts a thunderstorm for a random time between 3 and 13 minutes.
/weather clear 1dKeeps the weather clear for one in-game day (24000 ticks, 20 minutes).
/weather rain 600sMakes it rain for 600 seconds (12000 ticks).
/weather thunder 6000Starts a thunderstorm that lasts 6000 ticks (5 minutes).

