Skip to content

[OLD] Default Environment Controller Implementation

TheDeathlyCow edited this page Sep 4, 2023 · 1 revision

⚠️ This feature was removed in Thermoo v2.0.0. However, it is left up for posterity.

Thermoo provides a default implementation of the Environment Controller, detailed here.

Biome Temperature

The first thing to understand about passive temperature changes is biome temperature. Each biome has a temperature that is utilized by Thermoo to automatically determine how cold a biome is. The temperature of all vanilla biomes lies somewhere on a scale between -2 and +2. The amount of passive temperature change given in a biome is linearly related to the biome's temperature.

The formula for the amount passive temperature change each tick is as follows:

passive_temp_change = floor(mul * (biome_temperature - cutoff - shift) + 1)

The variables mul and cutoff are configurable values.

The shift is applied at night, and globally decreases the temperature of all biomes by a fixed amount.

If you want to know the per-tick freeze rate of a position, you can use the command /thermoo environment checktemperature ~ ~ ~.

Temperature Shifts

The temperature of all biomes shifts at night. By default, it will decrease by 0.25, which leads to a passive freezing increase of 1 per tick. This means that some of the cooler biomes that don't have any freezing during the day can start freezing at night.

Dry biomes (biomes where it does not rain, such as deserts and savannas) have a much more dramatic temperature decrease at night. These biomes are normally quite hot during the day, providing significant passive warmth. But at night they will instead begin freezing as the lack of moisture in the air makes it hard for the biome to hold warmth. This effect can be disabled.

Wetness

Entities can also become wet. There now have a new piece of data with the path Thermoo.WetTicks that tracks how wet they are. It has a minimum value of 0 and a maximum value of 600. However, it is mainly used as a 0-1 percentage scale. When out in the rain, this increases by 1 per tick. When touching, but not submerged in, water this increases by 5 per tick. When submerged in water, it will max out immediately.

Entities that are not exposed to water will have their wetness value decreased by 1 per tick. Being near light sources also speeds this up somewhat.

The formula for drying is as follows:

drying = -(1 + block_light_level // 4)

Block Light

Any source of artificial light (aka block light) provides warmth each tick per level of light according to the following formula:

warmth = warmth_per_light_level * (light_level - min_light_level_for_warmth)