Skip to content

1.10.2 API World Generation

JohnBraham edited this page Nov 27, 2026 · 2 revisions

Generation-safe climate queries

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.

Use supplied-biome overloads while generating terrain. The generator already knows which biome it selected and the candidate surface height, so there is no need to ask the world to load the target chunk.

WeatherApi.getClimate(world, candidateSurface, selectedBiome).ifPresent(climate -> {
    float baseline = climate.vanillaTemperature;
    float seasonal = climate.seasonalTemperature;
    float current = climate.openSkyWeather.temperature;
    LocalWeather.Precipitation falling = climate.openSkyWeather.precipitation;
    // Choose the variation your feature needs, then apply native placement checks.
});

The complete imports and a compiled wrapper are in the Java cookbook.

Query Use during generation
getClimate(world, pos, selectedBiome) Full climate and current open-sky weather, without chunk/block/heightmap/sky lookup.
getTemperature(world, pos, selectedBiome) Current outdoor temperature for the supplied biome and altitude.
getWeatherEpisode(world, selectedBiome) Local climate’s primary episode, if one exists.
getTemperatureEpisode(world, selectedBiome) Independent background cold snap/heatwave, if one exists.
getPopulationPolicy(world, selectedBiome) Server-only native/seasonal surface policy used by supported hooks.

biomeTemperature is the vanilla biome parameter before elevation. vanillaTemperature includes its native elevation adjustment. seasonalTemperature excludes temporary weather/live feed data; openSkyWeather.temperature includes current conditions. Local heaters and Forestry rooms do not alter these atmospheric generation readings.

Native and seasonal surface policies

NATIVE means the generator’s native snow/ice path remains authoritative, including configured protected biomes. SEASONAL means seasonal surface hooks are enabled and the biome is not protected. An empty policy is not permission to bypass your native policy. The query does not place snow, force chunk generation, waive support/light/water checks or cancel another mod’s Forge veto. If your generator separates virtual and saved biome identities, account for both as appropriate; this query answers for the supplied biome’s identity only.

Keep the generator’s own surface eligibility and material rules. If your feature needs shelter, the supplied-biome query intentionally does not supply it; only evaluate shelter once the necessary terrain is available. Avoid querying world.getBiome, heightmaps, neighbour blocks or local temperature zones for an ungenerated target merely to turn an unavailable answer into a value.

OTG virtual biomes and time

An OTG generator may use one virtual biome and save another registry biome in the chunk. The supplied-biome query describes the selected generation biome; later runtime queries describe the saved biome. ClimateSample.biomeId may be null for an unregistered virtual biome. Do not call toString() on it without checking.

Current climate is based on the world’s date and active configuration at generation time. It does not retrospectively regenerate old terrain when a season changes. For a feature that should ignore short-lived storms use a baseline or seasonal reading instead of current weather. Native Arctic/glacier exceptions remain relevant even if an ordinary temperate biome is currently snowy.

Generation-safe means no terrain lookup, not arbitrary-thread safe. The documented query contract is the owning world’s logical thread; capture a plain snapshot there before handing values to a worker. The API does not promise thread-safe mutation or async worldgen support.


Wiki home · Minecraft 1.10.2 guide · Implementation source

Clone this wiki locally