A lightweight, data-driven temperature engine for Minecraft 1.20.1 on Fabric.
Lous Temperature Core separates environment temperature from body temperature, provides datapack-driven heat/cold sources, a configurable simulation model, debugging tools, and a small API for addon mods.
Minecraft: 1.20.1
Loader: Fabric
Java: 17
License: MIT
Mappings: official Mojang mappings
This mod is a core/engine, not a full survival overhaul.
It calculates:
- Environment Temperature (°C) — biome, height, time, weather, nearby blocks, fluid immersion and addon modifiers.
- Body Temperature (°C) — a persistent player value that gradually reacts to the surrounding environment.
The built-in HUD shows body temperature, while the server keeps both values available for commands and addon APIs.
The Core intentionally does not add clothing, hypothermia damage, thirst, diseases or other large gameplay systems. Those mechanics can be implemented by separate addons without forcing every modpack to use the same survival rules.
- Dynamic environment temperature
- Persistent body temperature
- Configurable body adaptation
- Biome temperature mapped to Celsius
- Height cooling
- Night temperature penalty
- Rain and thunder modifiers
- Water and underwater cooling
- Direct lava immersion heating
- Data-driven block heat/cold sources
- Block tags and BlockState conditions
- Linear distance falloff
- Datapack reload support
- Built-in debug commands
- Config v2 with independently toggleable systems
- Minimal client HUD
- Experimental API for addon mods
- MIT licensed and open source
Biome / Winter base
+
Height
+
Time
+
Weather
+
Data-driven blocks
+
Immersion
+
API modifiers
↓
Environment Temperature
↓
Body Temperature target
↓
Gradual body adaptation
↓
Network sync → HUD
Minecraft's internal biome temperature is mapped to Celsius:
biome °C = vanilla biome temperature × scale + offsetCelsius
With the default config, Plains (0.8) maps to approximately 10°C before other modifiers.
Body temperature uses a continuous target:
body target =
normal body +
(environment - neutral environment) × environmentResponse
The stored body temperature then gradually approaches that target:
body += (target - body) × adaptationRate
This allows ordinary heat and cold sources to visibly affect the body instead of being hidden inside a large comfort deadzone.
This is a gameplay model, not a medical or complete physics simulation.
Heat and cold blocks are defined through datapack JSON instead of a hardcoded global block list.
Place files here:
data/<namespace>/temperature_sources/blocks/*.json
Example:
{
"entries": [
{
"target": "tag:minecraft:campfires",
"condition": {
"property": "lit",
"value": "true"
},
"power": 5.0,
"radius": 4
},
{
"target": "block:minecraft:ice",
"power": -1.5,
"radius": 3
}
]
}Rules:
- positive
power= heating - negative
power= cooling radiusis validated against the global maximum scan radiusblock:<id>rules have priority over matchingtag:<id>rules- v1 supports one optional BlockState
property=valuecondition - influence uses linear falloff:
effectivePower = power × (1 - distance / radius)
Tags are expanded while resources reload, so runtime calculations use a baked block cache instead of repeatedly searching tags.
Fluid immersion is separate from nearby block influence.
This distinction is intentional:
standing near lava → datapack block-source heat
being in lava → direct immersion heat
being in water → water cooling
head underwater → water cooling + extra underwater cooling
Default immersion values in 1.2.0:
- water:
-8°C - head underwater: additional
-4°C - lava immersion:
+35°C
All of these values can be changed or disabled in the config.
The config is generated at:
config/loustemperature.json
Config v2 is split into clear sections:
engine
environment.biome
environment.winter
environment.height
environment.time
environment.weather
environment.blockSources
environment.immersion
body
hud
Most temperature components can be enabled, disabled or tuned independently.
Block definitions remain datapack-driven and are intentionally not stored in the main config.
See the full configuration reference.
Old flat 1.1 configs are detected automatically.
Before migration, Core creates:
config/loustemperature.pre-1.2-backup.json
and then writes the new structured config.
Player commands:
/temperature check
/temperature debug
/temperature sources
Operator commands:
/temperature config
/temperature reload
/temperature winter true
/temperature winter false
/temperature body reset
/temperature debug shows the calculation breakdown, including nearby block influence and fluid immersion.
/temperature reload reloads the config and then triggers a server datapack reload, so edited temperature sources can be tested without restarting the game.
The API is intentionally small while the engine is being tested in real modpacks.
TemperatureSnapshot snapshot = TemperatureApi.getSnapshot(player);
float environment = snapshot.environmentTemperature();
float body = snapshot.bodyTemperature();Environment modifiers can be registered by other mods:
TemperatureApi.registerEnvironmentModifier(
new ResourceLocation("example", "season"),
(player, currentTemperature) -> -4.0f
);For custom blocks, addons usually do not need Java registration at all — they can ship temperature-source JSON inside their own JAR.
See the API documentation.
Install:
- Minecraft 1.20.1
- Fabric Loader
- Fabric API
- Lous Temperature Core
Install Core on the server. Clients using the built-in synced HUD should also have the mod and Fabric API installed.
Windows:
.\gradlew.bat clean buildLinux/macOS:
./gradlew clean buildCompiled JARs are written to:
build/libs/
src/main/java/com/lous12/temperature/core/
├── api/ public addon-facing API
├── commands/ /temperature commands
├── config/ config v2
├── impl/
│ ├── body/ body-temperature storage/adaptation
│ ├── calculation/ environment/block calculation
│ ├── data/ datapack loading
│ ├── registry/ baked temperature-source registry
│ └── runtime/ runtime cache/modifiers
├── ticker/ server calculation + sync
├── LousTemperatureCore.java
├── LousTemperatureClient.java
└── TemperatureHudRenderer.java
Planned directions include:
- biome datapack overrides
- public debug-breakdown API
- optional season integrations
- GitHub Pages config/datapack generator
- separate survival addon for insulation, hypothermia and overheating
- further datapack/API polish
The goal is to keep Core small and reusable while gameplay-heavy systems remain optional.
Issues, bug reports and pull requests are welcome.
When reporting temperature behavior, /temperature debug output is especially useful.
Lous Temperature Core is released under the MIT License.
See LICENSE.
Lous Temperature Core — лёгкое data-driven ядро температуры для Minecraft 1.20.1 + Fabric.
Мод разделяет два значения:
- температуру окружения — биом, высота, время суток, погода, блоки, вода/лава и модификаторы других модов;
- температуру тела — сохраняемое значение игрока, которое постепенно реагирует на окружение.
Core не пытается быть огромным survival-модом. Он даёт расчёт, конфигурацию, datapack-систему, HUD, debug-инструменты и API, а одежду, переохлаждение, перегрев и другие игровые последствия можно строить отдельными аддонами.
Основные возможности 1.2.0:
- гибкий Config v2;
- data-driven источники тепла/холода;
- теги блоков и BlockState-условия;
- вода, погружение под воду и лава;
- Environment + Body Temperature;
/temperature debug;/temperature config;/temperature reload;- минимальный HUD;
- экспериментальный API;
- автоматическая миграция старого конфига 1.1;
- открытый исходный код под MIT.
Подробности находятся в: