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 Type
    Method
    Description
    boolean
    Returns true while it rains, thunderstorms included.
    boolean
    Returns true during a thunderstorm.
    default void
    Changes the weather for a random duration.
    void
    setWeather(Weather weather, int durationTicks)
    Changes the weather.
    Returns the current weather.
  • Method Details

    • weather

      Weather weather()
      Returns the current weather.
      Returns:
      the current weather
      Since:
      0.1.0
    • isRaining

      boolean isRaining()
      Returns true while it rains, thunderstorms included.
      Returns:
      true while it rains, thunderstorms included
      Since:
      0.1.0
    • isThundering

      boolean isThundering()
      Returns true during a thunderstorm.
      Returns:
      true during a thunderstorm
      Since:
      0.1.0
    • setWeather

      void setWeather(Weather weather, int durationTicks)
      Changes the weather.
      Parameters:
      weather - the new weather
      durationTicks - how long it lasts before changing on its own; 0 for a random duration
      Since:
      0.1.0
    • setWeather

      default void setWeather(Weather weather)
      Changes the weather for a random duration.
      Parameters:
      weather - the new weather
      Since:
      0.1.0