Weather cache - tracks weather per dimension via weatherChange events
There is no native getter for weather; the cache listens to world.afterEvents.weatherChange and keeps the latest state.
world.afterEvents.weatherChange
// Before - no native way to read current weather// Afterconst weather = CacheLayer.getWeather(dimension);CacheLayer.setWeather(dimension, WeatherType.Rain); Copy
// Before - no native way to read current weather// Afterconst weather = CacheLayer.getWeather(dimension);CacheLayer.setWeather(dimension, WeatherType.Rain);
Optional
Weather cache - tracks weather per dimension via weatherChange events
There is no native getter for weather; the cache listens to
world.afterEvents.weatherChangeand keeps the latest state.Example