Interface Elytra
Elytra flight the way strict servers check it, shared by every flight module so that two of them never fight over the
glide (each would otherwise hold back the same pings and swap the same chest slot):
NoDurability: gliding without wearing the elytra, and catching a glide dropped in mid-air;ChestSwap: swapping the worn elytra with a chestplate in mid-air;GlideHold: riding out a moment the server stops the glide, unseen by Grim;Elytra.Pilot: a flight module flying the local player by its own rotation, and holding the glide open;Flight: a flight that flies itself along a heading (altitude(NoDurability.Owner),control(NoDurability.Owner)).
GlideEvent.
private final NoDurability noDurability = Myriad.elytra().noDurability(this);
protected void onEnable() {
Myriad.elytra().addPilot(this); // this implements Elytra.Pilot
noDurability.enable();
}
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA flight module flying the local player. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPilot(Elytra.Pilot pilot) Letspilotfly the local player untilremovePilot(Elytra.Pilot).altitude(NoDurability.Owner owner) A flight forownerthat crosses open country without fireworks, for any server: it dives until fast, pulls up and eases back to level, which holds its height, about 27 blocks a second (about 18 with No Durability where Grim simulates the glide, so 2b2t's chunks come in ahead of it).The chest swapper, shared by every flight.control(NoDurability.Owner owner) A flight forownerthat flies straight along its heading at a set speed, holding a height, only where the server doesn't simulate the glide (AntiCheat.Profile#simulatesGlide()false: NoCheatPlus, singleplayer); Grim sets it back from the first tick.The glide hold, shared by every flight; one owner arms it at a time.noDurability(NoDurability.Owner owner) A new No Durability engine forowner's flight:enableit when the flight starts.voidremovePilot(Elytra.Pilot pilot) Stopspilotflying the local player; nothing happens if it wasn't added.
-
Method Details
-
addPilot
Letspilotfly the local player untilremovePilot(Elytra.Pilot). -
removePilot
Stopspilotflying the local player; nothing happens if it wasn't added. Call it when the module turns off. -
noDurability
A new No Durability engine forowner's flight:enableit when the flight starts. Each call makes another; keep the one you get. -
chestSwap
ChestSwap chestSwap()The chest swapper, shared by every flight. -
altitude
A flight forownerthat crosses open country without fireworks, for any server: it dives until fast, pulls up and eases back to level, which holds its height, about 27 blocks a second (about 18 with No Durability where Grim simulates the glide, so 2b2t's chunks come in ahead of it). It takes off only from the air. The owner says whether to keep the elytra from wearing and hears its messages. -
control
A flight forownerthat flies straight along its heading at a set speed, holding a height, only where the server doesn't simulate the glide (AntiCheat.Profile#simulatesGlide()false: NoCheatPlus, singleplayer); Grim sets it back from the first tick. Speed builds as fast as NoCheatPlus's elytra check allows. It takes off from the ground by itself while it has a speed. -
glideHold
GlideHold glideHold()The glide hold, shared by every flight; one owner arms it at a time.
-