Class ServerPlayerEnvironmentTickEvents
java.lang.Object
com.github.thedeathlycow.thermoo.api.environment.event.ServerPlayerEnvironmentTickEvents
Events that are called for a server player each tick to update and apply passive temperature changes based on their
environment (as defined in datapacks).
These events will apply to players in spectator mode, but will not apply to dead or removed players.
The order that the events are executed for each player each tick is as follows:
- ALLOW_TEMPERATURE_UPDATE
- GET_TEMPERATURE_CHANGE
- ALLOW_TEMPERATURE_CHANGE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.fabricmc.fabric.api.event.Event<ServerPlayerEnvironmentTickEvents.AllowTemperatureChangeApply> Checks if the final temperature change update calculated byGET_TEMPERATURE_CHANGEshould be allowed to be applied to the player.static final net.fabricmc.fabric.api.event.Event<ServerPlayerEnvironmentTickEvents.AllowTemperatureChangeUpdate> Checks if the temperature update should be allowed to proceed at all.static final net.fabricmc.fabric.api.event.Event<ServerPlayerEnvironmentTickEvents.GetTemperatureChange> Computes the temperature point change for a temperature aware given their environment conditions. -
Method Summary
-
Field Details
-
ALLOW_TEMPERATURE_UPDATE
public static final net.fabricmc.fabric.api.event.Event<ServerPlayerEnvironmentTickEvents.AllowTemperatureChangeUpdate> ALLOW_TEMPERATURE_UPDATEChecks if the temperature update 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.At this stage, the context's environment components will be empty.
-
GET_TEMPERATURE_CHANGE
public static final net.fabricmc.fabric.api.event.Event<ServerPlayerEnvironmentTickEvents.GetTemperatureChange> GET_TEMPERATURE_CHANGEComputes the temperature point change for a temperature aware given their environment conditions. All returned values will be added to together and, if allowed, will be applied in one temperature change.From this point onwards, the context environment components will be defined, but some values may still be empty.
-
ALLOW_TEMPERATURE_CHANGE
public static final net.fabricmc.fabric.api.event.Event<ServerPlayerEnvironmentTickEvents.AllowTemperatureChangeApply> ALLOW_TEMPERATURE_CHANGEChecks if the final temperature change update calculated byGET_TEMPERATURE_CHANGEshould be allowed to be applied to the player. 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.
-