npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@eksses/eafe

v11.0.4

Published

Autonomous elytra flight engine for mineflayer — fly anywhere in Minecraft with 3 lines of code. Handles takeoff, climb, cruise, terrain avoidance, and safe landing automatically.

Downloads

496

Readme

⚡ @eksses/eafe

Elytra Autonomous Flight Engine

npm License Downloads Node

Autonomous elytra flight for Minecraft — takeoff, climb, cruise, land. Zero config.


Install

npm install @eksses/eafe mineflayer

Quick Start

const mineflayer = require('mineflayer');
const { ElytraFlight } = require('@eksses/eafe');

const bot = mineflayer.createBot({ host: 'localhost', username: 'Bot' });

bot.once('spawn', () => {
  const flight = new ElytraFlight(bot);
  flight.fly(500, 500);
});

Features

| Feature | Description | |:--------|:------------| | 3 Flight Modes | FAST (30 m/s), MED (22 m/s), LOW (15 m/s) | | Smart Landing | Auto land at safe spots with margin check | | Elytra Audit | Checks durability before flight | | Auto Rocket | Equips rockets automatically | | Terrain Avoidance | Scans and avoids obstacles | | Owner Alerts | Whisper notifications | | Wander Scan | Searches for safe spots over any terrain | | Retry System | Auto retry on failure |


API

new ElytraFlight(bot, options?)

Create a flight instance.

const flight = new ElytraFlight(bot, {
  mode: 'MED',           // 'FAST' | 'MED' | 'LOW'
  cruiseAlt: 180,        // Cruise altitude (Y blocks)
  maxRetries: 3,         // Retry attempts on failure
  safety: true,          // Pre-flight checks enabled
  debug: false,          // Verbose logging (false for production)
  ownerUsername: '',     // Whisper alerts to this player
  landingMargin: 2,      // Blocks from edge of landing spot
  targetX: 0,            // Default target X
  targetZ: 0,            // Default target Z
});

flight.fly(x, z, opts?)

Fly to coordinates. Options override constructor options.

flight.fly(500, 500);
flight.fly(500, 500, { mode: 'FAST', cruiseAlt: 200 });

flight.stop(reason?)

Emergency stop. Lands bot immediately.

flight.stop();
flight.stop('out of rockets');

flight.setMode(mode)

Change flight mode.

flight.setMode('FAST');  // FAST, MED, LOW

flight.setTarget(x, z)

Set target without flying.

flight.setTarget(100, 200);

flight.setStatus(x, z)

Get flight status.

const status = flight.setStatus(500, 500);
// {
//   phase: 'CRUISE',
//   mode: 'MED',
//   pos: { x: 100, y: 180, z: 200 },
//   target: { x: 500, z: 500 },
//   dist: 350,
//   elytra: { dur: 400, count: 2, unbreaking: 3 },
//   rockets: 20,
//   flying: true
// }

flight.preflight()

Pre-flight check without flying.

const check = await flight.preflight();
// {
//   ok: true,
//   elytra: { have: 432, need: 50 },
//   rockets: { have: 20, need: 8 }
// }

flight.isFlying

Boolean — true if elytra is active.

flight.phase

Current phase: IDLE, AUDIT, TAKEOFF, CLIMB, CRUISE, LAND, WANDER, FAILED.


Events

flight.on('phase', (phase, msg) => {
  console.log(phase);  // TAKEOFF, CLIMB, CRUISE, LAND, IDLE
});

flight.on('stopped', (reason) => {
  console.log(reason);  // user, respawn, out of rkt
});

flight.on('error', (err) => {
  console.error(err.message);
});

Flight Modes

| Mode | Speed | Fuel Use | Use Case | |:-----|:------|:---------|:---------| | FAST | 30 m/s | High | Emergency, short distance | | MED | 22 m/s | Medium | Default, balanced | | LOW | 15 m/s | Low | Long distance, fuel efficient |


Flight Phases

AUDIT → TAKEOFF → CLIMB → CRUISE → LAND → IDLE
                         ↘ WANDER (no spot found)
                         ↘ FAILED (error)
  1. AUDIT — Check elytra durability and rockets
  2. TAKEOFF — Jump and activate elytra
  3. CLIMB — Ascend to cruise altitude
  4. CRUISE — Fly toward target
  5. LAND — Spiral descent to safe spot
  6. WANDER — Search for safe landing spot
  7. IDLE — Landed or stopped
  8. FAILED — Error occurred

Helpers

const { countRockets, getElytraSummary } = require('@eksses/eafe');

const rockets = countRockets(bot);        // Number
const elytra = getElytraSummary(bot);     // { totalDurabilityAcrossAll, count, bestUnbreaking }

Examples

| Example | Description | |:--------|:------------| | basic.js | Simple flight | | demo.js | Chat commands | | delivery.js | Multi-stop delivery | | waypoint-travel.js | Location loop | | rescue-bot.js | Player rescue | | multi-bot.js | Fleet control | | inventory-transfer.js | Chest transfer | | api-demo.js | API showcase |


Requirements

  • Node.js ≥ 16.0.0
  • mineflayer ≥ 4.0.0
  • Bot must have elytra equipped in chest slot
  • Bot must have firework rockets in inventory

License

MIT