-
-
Notifications
You must be signed in to change notification settings - Fork 306
[1.20.x] Elytra Flight Attribute #46
Copy link
Copy link
Labels
26.1Targeted at Minecraft 26.1Targeted at Minecraft 26.1enhancementNew (or improvement to existing) feature or requestNew (or improvement to existing) feature or request
Metadata
Metadata
Assignees
Labels
26.1Targeted at Minecraft 26.1Targeted at Minecraft 26.1enhancementNew (or improvement to existing) feature or requestNew (or improvement to existing) feature or request
Type
Fields
Give feedbackNo fields configured for Enhancement.
Currently, enabling elytra flight requires an Item to override the flight method. Any other method of enabling flight with potions or abilities currenly requires several mixins. Forge already patches most of these methods to hook into the ForgeItem interface method.
There are 3 tiny mixins required to add Elytra flight via a potion: https://github.com/baileyholl/Ars-Nouveau/tree/1.20/src/main/java/com/hollingsworth/arsnouveau/common/mixin/elytra
The main issue with these mixins is that they easily conflict with other mods. Caelus, an API that provides an attribute for Elytra flight, also causes other mixin injections to fail on these points, requiring at least a soft check on the mod to provide compat.
Proposed solution:
Add a player attribute that uses the existing forge hooks to check for the ability to fly. This should be backwards compatible, as these hooks already exist at the required points.