Temperature Status Definition
Temperature statuses are a data-driven way of adding effects to temperature under certain conditions. Some examples include damage, mob effects, and attribute modifiers. These effects will periodically try to refresh themselves, based on some interval. They are used by both mods and datapacks. For mods, you should place your files in src/main/resources/data/[modid]/thermoo/temperature_status and for datapacks, they should instead be placed in [world]/datapacks/your_datapack/data/[namespace]/thermoo/temperature_status.
Info
For 1.21.11 and below, use Temperature Effects instead.
JSON format
Temperature statuses come in the following JSON format:
{}: The root tag"[]entity_type: Identifier of an entity type, a list of entity type IDs, or a#-prefixed entity type tag ID, for exampleminecraft:playeror#minecraft:freeze_hurts_extra_types. Only applies the effect for those entity types. This is a much more efficient of applying statuses to specific types than using a predicate, as the effect won't be ticked at all for other types. Optional: Defaults to an empty list, which ticks the effect for all entity types.D{}temperature_scale_range: A double range that specifies at what temperature scales the status should apply on. Note that the scale is a percentage from -1 to +1, not their actual temperature value. Use an object withDmin andDmax to check for number ranges. Optional: will accept any temperature scale if not specified.{}predicate: A Datapack Predicate. Used to dynamically restrict when a status will apply to an entity. Optional: if not specified then the status will be allowed to apply.Iinterval: A strictly positive int that controls how often, in ticks, that the status attempts to refresh itself on a target entity. Defaults to20.T/Fenabled_by_default: Whether this status is enabled by default. Defaults totrue. Note: changing this value will not automatically change the enabled status for entities that have already been loaded with it.[]effects: A list of the effects that this status will apply. See Effect Types for details on the format of these objects with the builtin effect types.
Effect Types
thermoo:attribute_modifier
Applies attribute modifiers to the target entities.
{}: The parent tag."type: Set tothermoo:attribute_modifier."attribute_type: The type ID of the attribute. For example,minecraft:max_healthorthermoo:heat_resistance.Dvalue: The value of the attribute modifier to apply."id: The ID of the attribute modifier to apply. For example,mydatapack:increase_speed_for_freezing.Eoperation: The operation of the modifier to apply, must be one ofadd_value,add_multiplied_base, oradd_multiplied_total.T/Fscale_with_temperature: Optional, whether to scale the value of the modifier with the target's temperature scale. Defaults tofalse.
thermoo:damage
Applies damage to the target entities.
{}: The root tag."type: Set ofthermoo:damage.Famount: Non-negative float, the amount of damage to apply on each pulse."damage_type: Identifier of the damage type to apply to the entity. For example,minecraft:freeze.
thermoo:function
Runs a datapack function.
{}: The root tag."type: Set ofthermoo:function."function: The ID of the function to execute."arguments: An SNBT string containing the function's macro arguments. Must be supplied if and only if the specified"function is a macro function.{}remove_function: The function to apply when the status is removed."function: The ID of the function to execute."arguments: An SNBT string containing the function's macro arguments. Must be supplied if and only if the specified"function is a macro function.
"permission_level: The permission level of the function to execute. Optional: Defaults to2, which is the normal permission level for functions. Note that this does not respect the function permission level set inserver.properties, it is only what is set here.
thermoo:mob_effect
Applies a set of mob effects to target entities.
"type: Set tothermoo:mob_effectorthermoo:status_effect.[]effects: A list of mob effect templates, whose entries have the following format:{}: The root tag."effect: The identifier of the mob effect type. For example,minecraft:speed.Iduration: A non-negative integer. The time (in ticks) the mob effect will be applied for. Optional: defaults to100.Iamplifier: An integer in the range[0, 255]. The amplifier of the mob effect. Optional: defaults to0.T/Fambient: Whether to use ambient effect particles. Optional: defaults tofalse.T/Fvisible: Whether to use show effect particles. Optional: defaults totrue.T/Fshow_icon: Whether to show the effect icon. Optional: defaults tofalse.
Examples
Apply freezing damage to players that are very cold.
{
"effects": [
{
"type": "thermoo:damage",
"amount": 1.0,
"damage_type": "minecraft:freeze"
}
],
"temperature_scale_range": {
"max": -0.99
}
}