Class LivingFallEvent

java.lang.Object
net.neoforged.bus.api.Event
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

public class LivingFallEvent extends LivingEvent implements net.neoforged.bus.api.ICancellableEvent
LivingFallEvent is fired when an Entity is set to be falling.
This event is fired whenever an Entity is set to fall in LivingEntity.causeFallDamage(float, float, DamageSource).

This event is fired via the CommonHooks.onLivingFall(LivingEntity, float, float).

distance contains the distance the Entity is to fall. If this event is canceled, this value is set to 0.0F.
This event is ICancellableEvent.
If this event is canceled, the Entity does not fall.

This event does not have a result.
invalid reference
HasResult


This event is fired on the NeoForge.EVENT_BUS.
  • Field Details

    • distance

      private float distance
    • damageMultiplier

      private float damageMultiplier
  • Constructor Details

    • LivingFallEvent

      public LivingFallEvent(LivingEntity entity, float distance, float damageMultiplier)
  • Method Details

    • getDistance

      public float getDistance()
    • setDistance

      public void setDistance(float distance)
    • getDamageMultiplier

      public float getDamageMultiplier()
    • setDamageMultiplier

      public void setDamageMultiplier(float damageMultiplier)