Class LivingEntityTemperatureTickEvents
There are two categories of temperature change update ticks: passive and active. Passive changes should be used for temperature changes from nearby blocks, such as heat from light sources or cooling from an air conditioner. Active changes should be used for temperature changes from entity effects such as heat from being on fire, or cold from being submerged in powder snow.
For environmental effects, see the EnvironmentDefinition that handles
the environment datapack registries, and ServerPlayerEnvironmentTickEvents
for applying temperature changes from those environmental conditions.
The events are invoked in the following order:
- ALLOW_(PASSIVE|ACTIVE)_TEMPERATURE_UPDATE
- GET_(PASSIVE|ACTIVE)_TEMPERATURE_CHANGE
- ALLOW_(PASSIVE|ACTIVE)_TEMPERATURE_CHANGE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.AllowTemperatureChange> Checks if the final active temperature change update calculated byGET_ACTIVE_TEMPERATURE_CHANGEshould be allowed to be applied to a living entity this tick.static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.AllowTemperatureUpdate> Checks if the active temperature update tick for a living entity should be allowed to proceed at all.static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.AllowTemperatureChange> Checks if the final passive temperature change update calculated byGET_PASSIVE_TEMPERATURE_CHANGEshould be allowed to be applied to a living entity this tick.static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.AllowTemperatureUpdate> Checks if the passive temperature update tick for a living entity should be allowed to proceed at all.static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.GetTemperatureChange> Gets the active change update that should be applied to a living entity this tick by summing all values supplied by listeners.static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.GetTemperatureChange> Gets the passive change update that should be applied to a living entity this tick. -
Method Summary
-
Field Details
-
ALLOW_PASSIVE_TEMPERATURE_UPDATE
public static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.AllowTemperatureUpdate> ALLOW_PASSIVE_TEMPERATURE_UPDATEChecks if the passive temperature update tick for a living entity should be allowed to proceed at all. Returning any non-default value will force the update to proceed right away. By default, the update will be allowed to proceed.Passive changes should be used for temperature changes from nearby blocks, such as heat from light sources or cooling from an air conditioner.
-
GET_PASSIVE_TEMPERATURE_CHANGE
public static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.GetTemperatureChange> GET_PASSIVE_TEMPERATURE_CHANGEGets the passive change update that should be applied to a living entity this tick.Passive changes should be used for temperature changes from nearby blocks, such as heat from light sources or cooling from an air conditioner.
-
ALLOW_PASSIVE_TEMPERATURE_CHANGE
public static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.AllowTemperatureChange> ALLOW_PASSIVE_TEMPERATURE_CHANGEChecks if the final passive temperature change update calculated byGET_PASSIVE_TEMPERATURE_CHANGEshould be allowed to be applied to a living entity this tick. Returning any non-default value will force the update to be applied right away. By default, the update will be allowed to be applied. A temperature change of 0 will not invoke this event, and temperature changes of 0 will never apply.Passive changes should be used for temperature changes from nearby blocks, such as heat from light sources or cooling from an air conditioner.
-
ALLOW_ACTIVE_TEMPERATURE_UPDATE
public static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.AllowTemperatureUpdate> ALLOW_ACTIVE_TEMPERATURE_UPDATEChecks if the active temperature update tick for a living entity should be allowed to proceed at all. Returning any non-default value will force the update to proceed right away. By default, the update will be allowed to proceed.Active changes should be used for temperature changes from entity effects such as heat from being on fire, or cold from being submerged in powder snow.
-
GET_ACTIVE_TEMPERATURE_CHANGE
public static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.GetTemperatureChange> GET_ACTIVE_TEMPERATURE_CHANGEGets the active change update that should be applied to a living entity this tick by summing all values supplied by listeners. May be positive or negative.Active changes should be used for temperature changes from entity effects such as heat from being on fire, or cold from being submerged in powder snow.
-
ALLOW_ACTIVE_TEMPERATURE_CHANGE
public static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.AllowTemperatureChange> ALLOW_ACTIVE_TEMPERATURE_CHANGEChecks if the final active temperature change update calculated byGET_ACTIVE_TEMPERATURE_CHANGEshould be allowed to be applied to a living entity this tick. Returning any non-default value will force the update to be applied right away. By default, the update will be allowed to be applied. A temperature change of 0 will not invoke this event, and temperature changes of 0 will never apply.Active changes should be used for temperature changes from entity effects such as heat from being on fire, or cold from being submerged in powder snow.
-