Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Thermoo Wiki › Guides › Making Your Own Mod or Addon Use Thermoo's Temperature API

Making Your Own Mod or Addon Use Thermoo's Temperature API

If you're a developer building on Thermoo, the payoff is not having to reinvent temperature tracking, unit conversion, or wetness. Here's the practical path.

Depend on the API, not the implementation

Add Thermoo as a dependency in your build configuration and declare it in your mod metadata so loaders order it correctly. Thermoo exposes temperature as a component attached to entities; you query and modify it through that API rather than storing your own float. This means your mod automatically interoperates with every other Thermoo-based mod — a player wearing your insulated armor and standing in another mod's cold biome gets correct combined behavior with no compatibility patch.

Attach effects through events

Thermoo fires events around temperature changes and provides hooks for applying effects when an entity crosses thresholds. Register listeners there instead of polling every tick. For default item attributes — say, a cloak that resists cold — configure them through the data-driven attribute system so pack authors can override your values.

Respect units

Never assume Celsius. Read and write temperatures through the unit-agnostic record so your mod works regardless of how a pack or another mod expresses values. Test with the Thermoo commands to confirm your effects fire at the thresholds you expect.