Repository navigation
1.10.2 API Reference
Minecraft 1.10.2 · Sky’s Realistic Weather 0.1.21.110021 · API 8 · config 8. See version support before using these examples in another port.
Only zone.moddev.mc.skysrealisticweather.api is the supported integration package. WeatherApi.VERSION is 8 and WeatherApi.SNOW_LINE is 0.15F. Arguments must be non-null unless a specific contract says otherwise. Read world state on the owning logical thread; absence, unloaded terrain and pending client synchronization are normal cases to handle.
| Return | WeatherApi method | Contract |
|---|---|---|
Optional<SeasonSnapshot> |
getSeason(World) |
Shared calendar; initialized climate frame required. |
Optional<LocalWeather> |
getWeather(World, BlockPos) |
Loaded position; final local storm coverage and shelter; atmospheric temperature. |
OptionalDouble |
getTemperature(World, BlockPos) |
Loaded position and frame; outdoor/current temperature only. |
OptionalDouble |
getTemperature(World, BlockPos, Biome) |
Supplied biome/current altitude; no terrain lookup. |
OptionalDouble |
getLocalTemperature(World, BlockPos) |
Effective temperature at a loaded position; finite native fallback plus local zones can work outside seasonal dimensions. |
Optional<TemperatureSample> |
getTemperatureSample(World, BlockPos) |
Same effective reading plus ambient, source and nullable zone/source ID. |
boolean |
putTemperatureZone(World, TemperatureZone) |
Server logical thread; world-scoped insert/atomic replace; true only when changed. |
boolean |
removeTemperatureZone(World, ResourceLocation) |
Server logical thread; true only if a registration existed. |
Optional<ClimateSample> |
getClimate(World, BlockPos) |
Loaded position and frame; biome lookup, current open-sky climate. |
Optional<ClimateSample> |
getClimate(World, BlockPos, Biome) |
Supplied generation biome/height; no terrain or shelter lookup. |
BiomeClimate |
getBiomeClimate(Biome) |
Resolved registered modifier; use after mod loading. Not a preset object. |
Optional<WeatherApi.PopulationPolicy> |
getPopulationPolicy(World, Biome) |
Server initialized frame only; NATIVE or SEASONAL for supported surface hooks. |
Optional<WeatherEpisode> |
getWeatherEpisode(World) |
Overworld carrier scheduled/forced episode; no local terrain lookup. |
Optional<WeatherEpisode> |
getWeatherEpisode(World, BlockPos) |
Loaded position; primary episode for its biome. |
Optional<WeatherEpisode> |
getWeatherEpisode(World, Biome) |
Primary episode for a supplied biome; no chunk lookup. |
Optional<WeatherEpisode> |
getTemperatureEpisode(World, BlockPos) |
Loaded position; independent local cold-snap/heatwave lane. |
Optional<WeatherEpisode> |
getTemperatureEpisode(World, Biome) |
Thermal lane for supplied biome; no chunk lookup. |
void |
registerBiomeClimate(ResourceLocation, BiomeClimate) |
Init/post-init on both physical sides; one override per registered ID; frozen at load completion. |
void |
registerPlantGrowthProfile(String, PlantGrowthProfile) |
Init/post-init; one definition per selector; config/scripts take precedence. |
Optional<PlantGrowthSample> |
getPlantGrowth(World, BlockPos) |
Loaded existing plant and climate frame; empty when unavailable or not a supported plant/growable. |
Atmospheric frame queries are normally available for the supported Overworld after initialization. Local-temperature queries are different: at a loaded position they can fall back to finite native biome temperature and local zones in other dimensions. A non-finite biome temperature can make a local sample unavailable; atmospheric consumers should also check numerical validity rather than assuming a present Optional proves a third-party biome is well-formed.
An empty weather episode is a clear/no-episode condition, vanilla-command weather, a live feed or an inactive/unsupported world—not proof that no rain is reaching a player. Use getWeather for current precipitation. Creating an episode/value object does not apply it to a world.
SeasonSnapshot: season, 1-based dayOfSeason, lengthInDays, progress in [0,1). Season is SPRING, SUMMER, AUTUMN, WINTER. A local climate snapshot can describe a different phase proportion/label from the shared calendar returned by getSeason.
| ClimateSample field | Meaning |
|---|---|
position, biomeId
|
Immutable sample position; registry ID can be null for an unregistered supplied virtual biome. |
mode, climateId, phaseLabel, season
|
Climate mode (PER_BIOME/UNIVERSAL/REAL_WORLD), resolved climate identifier, player-facing local phase name and its snapshot. |
biomeClimate |
Registered offset/seasonal scale/precipitation rule. |
biomeTemperature |
Native biome temperature parameter before elevation. |
vanillaTemperature |
Native biome temperature at height. |
seasonalTemperature |
Seasonal atmospheric result before temporary episodes/live data. |
biomeRainfall |
Vanilla rainfall parameter, not measured relative humidity or soil moisture. |
normallyAllowsPrecipitation, naturallySnowy
|
Normal biome precipitation/snow characteristics, without a current dry-biome event exception. |
wetnessMultiplier, thunderMultiplier
|
Relative seasonal schedule factors, not probabilities or precipitation amounts. |
fogPotential |
Seasonal fog potential in [0,1], not necessarily current fog. |
openSkyWeather |
Current conditions assuming an unobstructed sky. Local heated zones are excluded. |
LocalWeather has precipitation, source, temperature, fog, thunder, intensity and wind. Temperature is atmospheric MC units; fog, falling intensity and outdoor wind are on a 0–1 scale. Precipitation is NONE, RAIN, SNOW, HAIL or FREEZING_RAIN. Source is VANILLA, SEASONAL or LIVE. Loaded-position getWeather includes shelter; ClimateSample.openSkyWeather does not.
TemperatureSample has ambientTemperature, effective temperature, source and nullable zoneId. Source is AMBIENT, ZONE, FURNACE, FORESTRY, FIRE, LAVA or TORCH. Ambient/Forestry have no zone ID; automatic block sources identify the source block, rather than a child registration. Built-in furnace IDs start skysrealisticweather:furnace/; other built-ins start skysrealisticweather:heat/<type>/. Only the winning contribution is reported.
Do not use LocalWeather.Source and TemperatureSample.Source interchangeably: one identifies the weather provider and the other the effective-temperature provider.
PlantGrowthSample: plantId, profileId, effective MC-unit temperature, naturalGrowthMultiplier, controlledClimate and reason. Reasons are SUITABLE, COLD, HEAT, EXEMPT, UNMAPPED, DISABLED and ADAPTER_DISABLED. A bypass can return multiplier 1; an absent sample means retain native behaviour. Controlled climate means the effective sample came from a non-AMBIENT source, including a nearby vanilla heater, not necessarily an enclosed room.
PlantGrowthProfile exposes its four ordered temperature knots and exempt. multiplier(float) returns 0 at/beyond a limit, 1 in the ideal band and a linear transition between. EXEMPT and non-finite inputs return 1. A multiplier is for an eligible native growth attempt; it is not a growth-stage count, harvest multiplier or replacement for soil/light/genetics checks.
WeatherEpisode: kind, startTick, exclusive endTick, peakIntensity, includesDryBiomes, forced. Maximum duration is 48000 ticks. Use time(daylight, total) to choose the clock, then contains(time), intensity(time), covers(x,z,time) and windBearing() as needed. Bearing is clockwise from north, toward the direction of travel. Peak intensity is not instantaneous intensity. Forced previews cover the world geometrically but final biome/temperature/shelter rules still apply.
WeatherKind values: DRIZZLE, FRONTAL_PRECIPITATION, CONVECTIVE_SHOWER, THUNDERSTORM, SEVERE_THUNDERSTORM, HAILSTORM, MONSOON_BURST, TROPICAL_STORM, WINTER_STORM, SNOW_SQUALL, FREEZING_RAIN, BLIZZARD, RADIATION_FOG, ADVECTION_FOG, DUST_STORM, HEATWAVE, COLD_SNAP, BLOWING_SNOW. Each has wet, thunder, fog, wind, temperatureOffset; temperatureSpell() identifies HEATWAVE/COLD_SNAP. These describe event behaviour, not a physical wind speed or rainfall measurement.
See registration and events for all three Forge events and temperature zones for constructors, limits, priority, synchronization and persistence.
Sky’s Realistic Weather · Version support · Source · Issues
Home · Version support · Languages
- Version guide
- Port status and builds
- Getting started
- Mod integrations
- Java API and examples
- API reference
- Generator compatibility
- Multiplayer and performance
- JEI client checks
- Integration versions
- Dependency metadata and publishing
- Getting started
- Configuration
- Climate presets and biomes
- Weather events
- Farming
- Thermometers
- Distant weather
- Pack workflow
- Mod integrations
- CraftTweaker
- Generator compatibility
- Administration
- Saved world settings
- Real-world requests