Interface WeatherManager
public interface WeatherManager
The weather of a world, obtained with
World.weather(). The instance registered
as a service manages the weather of the overworld.- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstruewhile it rains, thunderstorms included.booleanReturnstrueduring a thunderstorm.default voidsetWeather(Weather weather) Changes the weather for a random duration.voidsetWeather(Weather weather, int durationTicks) Changes the weather.weather()Returns the current weather.
-
Method Details
-
weather
-
isRaining
boolean isRaining()Returnstruewhile it rains, thunderstorms included.- Returns:
truewhile it rains, thunderstorms included- Since:
- 0.1.0
-
isThundering
boolean isThundering()Returnstrueduring a thunderstorm.- Returns:
trueduring a thunderstorm- Since:
- 0.1.0
-
setWeather
Changes the weather.- Parameters:
weather- the new weatherdurationTicks- how long it lasts before changing on its own;0for a random duration- Since:
- 0.1.0
-
setWeather
Changes the weather for a random duration.- Parameters:
weather- the new weather- Since:
- 0.1.0
-