@Suppress("unused")
@EventBusSubscriber( modid = Katton.MOD_ID, value = [Dist.DEDICATED_SERVER] )
modidLiving entity behavior events for NeoForge platform.
This object provides events related to living entity behaviors including animal taming, baby spawning, elytra flight, and sleeping.
LivingBehaviorEvent.onAnimalTame
val onAnimalTameEvent triggered when an animal is being tamed. Can be cancelled to prevent taming.
LivingBehaviorEvent.onBabySpawn
val onBabySpawnEvent triggered when a baby entity is spawning (breeding). Can be cancelled to prevent the spawn.
LivingBehaviorEvent.onElytraAllow
@JvmField
@JvmField val onElytraAllowEvent triggered to check if an entity is allowed to use elytra.
Returns
true to allow elytra usage, false to deny.
LivingBehaviorEvent.onElytraCustom
@JvmField
@JvmField val onElytraCustomEvent triggered to provide custom elytra flight behavior.
Returns
true if custom behavior is applied, false to use default.
LivingBehaviorEvent.onAllowSleeping
@JvmField
@JvmField val onAllowSleepingEvent triggered to check if a player is allowed to sleep.
Returns
BedSleepingProblem if sleep is denied, null to allow.
LivingBehaviorEvent.onStartSleeping
@JvmField
@JvmField val onStartSleepingEvent triggered when a player starts sleeping.
LivingBehaviorEvent.onStopSleeping
@JvmField
@JvmField val onStopSleepingEvent triggered when a player stops sleeping.
LivingBehaviorEvent.onAllowBed
@JvmField
@JvmField val onAllowBedEvent triggered to check if a player is allowed to use a bed.
Returns
EventResult indicating the result of the check.
LivingBehaviorEvent.onAllowNearbyMonsters
@JvmField
@JvmField val onAllowNearbyMonstersEvent triggered to check if nearby monsters prevent sleeping.
Returns
EventResult indicating whether monsters should prevent sleep.
LivingBehaviorEvent.onAllowResettingTime
@JvmField
@JvmField val onAllowResettingTimeEvent triggered to check if time should reset after sleeping.
Returns
true to allow time reset, false to prevent it.
LivingBehaviorEvent.onModifySleepingDirection
@JvmField
@JvmField val onModifySleepingDirectionEvent triggered to modify the sleeping direction when entering a bed.
Returns
The modified direction for the player to face.
LivingBehaviorEvent.onAllowSettingSpawn
@JvmField
@JvmField 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
@JvmField
@JvmField val onSetBedOccupationStateEvent triggered to set the bed occupation state.
Returns
true if the state was handled, false for default behavior.
LivingBehaviorEvent.onModifyWakeUpPosition
@JvmField
@JvmField val onModifyWakeUpPositionEvent triggered to modify the player's wake-up position.
Returns
The modified Vec3 wake-up position.
LivingBehaviorEvent.onPlayerWakeUp
val onPlayerWakeUpEvent triggered when a player wakes up from sleeping.