How Climate Works
Townstead works out the air temperature at every place from one climate model. Villagers, crops, rooms and thermometers use it, and players feel it through the temperature mod. See Temperature Mods.
The climate model runs only when a temperature mod is installed: Legendary Survival Overhaul, Cold Sweat or Tough As Nails. Without one, Townstead has no temperature. Crops grow as in vanilla, and the Pheno climate values read the vanilla biome temperature.
This section is for pack authors. For the player’s view, see Climate.
The Parts of the Climate
Section titled “The Parts of the Climate”| Part | What sets it | Page |
|---|---|---|
| Yearly mean | The biome’s profile, from real climate data. Plains average about 12 °C over the year. | Biome Profiles |
| Seasons | The biome’s profile, or its climate zone, sets the size of the swing. A season mod sets the time of year. | Seasons & Calendars |
| Day and night | The climate zone sets the range. Rain and cloud make it smaller. | Climate Zones |
| Weather | Rain cools the air by evaporation, more in dry air. Falling snow and lying snow have their own rules. | Climate Settings |
| Altitude | Air gets colder above sea level. | Climate Settings |
| Dimension | A dimension can use biome climates or one fixed temperature. | Dimensions |
| Underground | Under natural terrain, the air moves toward the ground temperature. Deep rock and buried lava are warm. | Underground |
| Rooms | An enclosed space has its own air temperature. | Temperature |
| Local heat | Fires, stoves and ice near a position warm or cool it. Pheno fields can add a local climate. | Pheno |
How Townstead Calculates the Air
Section titled “How Townstead Calculates the Air”For a position outside any room, Townstead does these steps in order:
- Take the yearly mean of the biome, then subtract the altitude cooling.
- Add the seasonal swing for today’s date. With no season mod, this is zero.
- Add the day and night curve for the time of day.
- Add the rain cooling. Then apply the snow rules.
- Blend toward the ground temperature when natural terrain covers the position.
- Add nearby heat and cooling sources, and any Pheno local climate.
In a TerraFirmaCraft world, TerraFirmaCraft’s own temperature replaces steps 1 to 3. See TerraFirmaCraft Worlds.
Inside a room, Townstead uses the room’s own air temperature. The room exchanges heat with the outdoor air from step 4 and with the ground below it.
Example: Temperate Plains
Section titled “Example: Temperate Plains”The plains biome is in the temperate zone. With a season mod installed, plains air goes from about 0 °C on a clear winter night to about 25 °C on a summer afternoon. With no season mod, every day is a mild growing-season day: about 13 °C before sunrise and about 22 °C in the afternoon.
Use /townstead climate year minecraft:plains to see the full year. See Testing & Commands.
Data Files
Section titled “Data Files”| File | What it controls | Page |
|---|---|---|
data/<namespace>/climate/biome/<path>.json | One biome’s climate, from real data. | Biome Profiles |
data/<namespace>/climate/zone/<id>.json | One climate zone, for biomes without a profile. | Climate Zones |
data/<namespace>/climate/derivation.json | How biomes with no zone tag get a zone. | Climate Zones |
data/<namespace>/climate/dimension/<id>.json | The climate of one dimension. | Dimensions |
data/<namespace>/tags/worldgen/biome/climate/<zone>.json | Which biomes are in a zone. | Climate Zones |
data/<namespace>/tags/block/crops/climate/<class>.json | Which crops are in a crop climate class. | Crops |
data/townstead/need/temperature.json | Means, weather, snow, ground and crop numbers. | Climate Settings |
Pheno can read the climate and change it locally:
- The
pheno:climatecondition tests the zone, the time of year, snow and the air temperature. See Conditions. - The
pheno:air_temperatureandpheno:climatevalues read numbers from the climate. See Selectors & Values. climate_offset_conpheno:cloudmakes a field that warms or cools the air inside it, for every temperature mod. See Actions.