Mod Caelus API (Forge) by TheIllusiveC4
- 29787247
- 37.27 KB
- 1.20.1
- December 14, 2018
- June 11, 2023
- API and Library
Name | Caelus API (Forge) | Author | TheIllusiveC4 | Description | A coremod and API to provide developers access to elytra flight mechanics through an entity attribute. |
---|---|---|---|---|---|
Information | Downloads: 29787247 Version: 1.20.1 Size: 37.27 KB Updated at: June 11, 2023 Created at: December 14, 2018 | Tags | API and Library |
Overview
This project is for the Forge mod loader. To see its counterpart for the Fabric mod loader, please go here.
Caelus is a small utility mod that abstracts the hardcoded vanilla elytra behavior into a more generic elytra flight attribute and exposes this to mod developers seeking to implement elytra flight for their own mods.
All modders have to do is call the CaelusAPI.ELYTRA_FLIGHT attribute where applicable. The attribute has a default value of 0, which forbids any elytra flight. Attribute values greater than or equal to 1 will enable elytra flight. The vanilla elytra item has also been changed to use this attribute, keeping its behavior the same as normal.
Pre-1.16 Features
Toggle Elytra - Using a keybinding, default 'v', players can toggle whether or not to use elytra flight. When it's off, the player cannot activate elytra flight at all. When it's on, the elytra flight can be activated as normal.
Trigger Elytra - Using a keybinding, default nothing, players can automatically activate elytra flight without needing to do the usual awkward jump and then jump again. This works whether they're in mid-air or on the ground (although you'll likely fall flat on your face unless you activate it on a ledge).
Simple Takeoff - If true, when you using the Trigger Elytra keybinding from the ground, players can optionally hold down the key in order to automatically deploy a firework from their inventory after activating the elytra. This turns the usual 3-step takeoff process (jump -> jump -> use firework) into a single held down key press.
Adding to Your Project:
Add the following to your build.gradle file:
repositories { maven { url = "https://maven.theillusivec4.top/" } } dependencies { runtimeOnly fg.deobf("top.theillusivec4.caelus:caelus-forge:${version}") compileOnly fg.deobf("top.theillusivec4.caelus:caelus-forge:${version}") }