Class EntityElytraEvents
java.lang.Object
net.fabricmc.fabric.api.entity.event.v1.EntityElytraEvents
Events related to elytra flight for living entities. Elytra flight is also known as "fall flying".
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Event<EntityElytraEvents.Allow>
An event to check if elytra flight (both through normal and custom elytras) is allowed.static final Event<EntityElytraEvents.Custom>
An event to grant elytra flight to living entities when some condition is met. -
Method Summary
-
Field Details
-
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
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.
-