@Suppress("unused")
object LivingBehaviorEventLiving entity behavior events for Fabric platform.
This object provides events related to living entity behaviors including elytra flight, sleeping, animal taming, and baby spawning.
LivingBehaviorEvent.onElytraAllow
val onElytraAllowEvent triggered to check if an entity is allowed to use elytra.
Returns
true to allow elytra usage, false to deny.
LivingBehaviorEvent.onElytraCustom
val onElytraCustomEvent triggered to provide custom elytra flight behavior.
Returns
true if custom behavior is applied, false to use default.
LivingBehaviorEvent.onAllowSleeping
val onAllowSleepingEvent triggered to check if a player is allowed to sleep.
Returns
BedSleepingProblem if sleep is denied, null to allow.
LivingBehaviorEvent.onStartSleeping
val onStartSleepingEvent triggered when a player starts sleeping.
LivingBehaviorEvent.onStopSleeping
val onStopSleepingEvent triggered when a player stops sleeping.
LivingBehaviorEvent.onAllowBed
val onAllowBedEvent triggered to check if a player is allowed to use a bed.
Returns
EventResult indicating the result of the check.
LivingBehaviorEvent.onAllowNearbyMonsters
val onAllowNearbyMonstersEvent triggered to check if nearby monsters prevent sleeping.
Returns
EventResult indicating whether monsters should prevent sleep.
LivingBehaviorEvent.onAllowResettingTime
val onAllowResettingTimeEvent triggered to check if time should reset after sleeping.
Returns
true to allow time reset, false to prevent it.
LivingBehaviorEvent.onModifySleepingDirection
val onModifySleepingDirectionEvent triggered to modify the sleeping direction when entering a bed.
Returns
The modified direction for the player to face.
LivingBehaviorEvent.onAllowSettingSpawn
val onAllowSettingSpawnEvent triggered to check if spawn point should be set when sleeping.
Returns
true to allow setting spawn, false to prevent it.
LivingBehaviorEvent.onSetBedOccupationState
val onSetBedOccupationStateEvent triggered to set the bed occupation state.
Returns
true if the state was handled, false for default behavior.
LivingBehaviorEvent.onModifyWakeUpPosition
val onModifyWakeUpPositionEvent triggered to modify the player's wake-up position.
Returns
The modified Vec3 wake-up position.
LivingBehaviorEvent.onPlayerWakeUp
@JvmField
@JvmField val onPlayerWakeUpEvent triggered when a player wakes up from sleeping.