Class LivingEntityTemperatureTickEvents

java.lang.Object
com.github.thedeathlycow.thermoo.api.temperature.event.LivingEntityTemperatureTickEvents

public final class LivingEntityTemperatureTickEvents extends Object
Events for ticking passive and active temperature changes on entities on the logical server. These events will apply to spectator entities, but will not apply to dead or removed entities.

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
  • Field Details

    • ALLOW_PASSIVE_TEMPERATURE_UPDATE

      public static final net.fabricmc.fabric.api.event.Event<LivingEntityTemperatureTickEvents.AllowTemperatureUpdate> ALLOW_PASSIVE_TEMPERATURE_UPDATE
      Checks 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_CHANGE
      Gets 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_CHANGE
      Checks if the final passive temperature change update calculated by GET_PASSIVE_TEMPERATURE_CHANGE should 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_UPDATE
      Checks 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_CHANGE
      Gets 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_CHANGE
      Checks if the final active temperature change update calculated by GET_ACTIVE_TEMPERATURE_CHANGE should 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.