Class LivingEntityTemperatureTickEvents
java.lang.Object
com.github.thedeathlycow.thermoo.api.core.v2.event.LivingEntityTemperatureTickEvents
Events for ticking temperature changes on living entities on the logical server. These events will not apply
to dead or removed entities.
For finer grained control over whether a temperature change is allowed to proceed or to react after a change has
been applied, see TemperatureChangeEvents.
For environmental effects, see EnvironmentDefinition for
the environment changes, and
ServerPlayerEnvironmentTickEvents for applying
temperature changes from environmental conditions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Method Summary
Modifier and TypeMethodDescriptionstatic dev.yumi.commons.event.Event<net.minecraft.resources.Identifier, LivingEntityTemperatureTickEvents.GetTemperatureChange> getTemperatureChange(net.minecraft.resources.ResourceKey<TemperatureSource> sourceKey) Returns the temperature change event for a specificTemperatureSource.
-
Method Details
-
getTemperatureChange
public static dev.yumi.commons.event.Event<net.minecraft.resources.Identifier, LivingEntityTemperatureTickEvents.GetTemperatureChange> getTemperatureChange(net.minecraft.resources.ResourceKey<TemperatureSource> sourceKey) Returns the temperature change event for a specificTemperatureSource. Each registered listener contributes a temperature change value that is summed and applied to the entity viaTemperatureAware.thermoo$addTemperature(int, com.github.thedeathlycow.thermoo.api.core.v2.TemperatureChange).Note that this event is only invoked for sources that are registered to the level's ticking sources and have a
TemperatureSource.tickInterval()greater than0.- Parameters:
sourceKey- The registry key of the temperature source to get the event for, may not benull.- Returns:
- Returns the event for the given source key, creating it if it does not already exist.
- Throws:
IllegalArgumentException- If the given source is not allowed to be ticked by this event.
-