Class EntityElytraEvents

java.lang.Object
net.fabricmc.fabric.api.entity.event.v1.EntityElytraEvents

public final class EntityElytraEvents extends Object
Events related to elytra flight for living entities. Elytra flight is also known as "fall flying".
  • Field Details

    • ALLOW

      public static final Event<EntityElytraEvents.Allow> ALLOW
      An event to check if elytra flight (both through normal and custom elytras) is allowed. All listeners need to return true to allow the entity to fly, otherwise elytra flight will be blocked/stopped.
    • CUSTOM

      public static final Event<EntityElytraEvents.Custom> CUSTOM
      An event to grant elytra flight to living entities when some condition is met. Will be called when players try to start elytra flight by pressing space in mid-air, and every tick for all flying living entities to check if elytra flight is still allowed.

      Items that wish to enable custom elytra flight when worn in the chest equipment slot can simply implement FabricElytraItem instead of registering a listener.