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

@nxg-org/mineflayer-ender

v1.2.5

Published

A plugin dedicated to bots being like endermen.

Downloads

135

Readme

[!WARNING] This plugin is still under active iteration. The core pearling flow works, but the API is still fairly low-level.


mineflayer-ender gives Mineflayer bots a reusable ender-pearl planning layer instead of forcing every project to manually calculate yaw, pitch, travel ticks, and collision checks.

It is useful when you want a bot to:

  • Pearl onto a specific block
  • Pearl into an arbitrary world-space AABB target
  • Plan whether a pearl shot is valid before throwing
  • Reuse projectile simulation logic in your own combat or movement systems
  • Build more "enderman-like" movement around a clean plugin surface

  • [X] Attach bot.ender to Mineflayer bots
  • [X] Check whether pearls are available in inventory
  • [X] Auto-equip pearls before throwing
  • [X] Plan a valid pearl shot to a target block
  • [X] Plan a valid pearl shot to a target AABB
  • [X] Expose low-level shot simulation via EnderShotFactory
  • [ ] Higher-level chase / combat automation
  • [ ] Broader polished docs and examples

npm install @nxg-org/mineflayer-ender

The plugin depends on @nxg-org/mineflayer-util-plugin and loads it automatically if your bot does not already have bot.util.


import { createBot } from "mineflayer";
import enderPlugin from "@nxg-org/mineflayer-ender";

const bot = createBot({
  host: "localhost",
  port: 25565,
  username: "ender-bot"
});

bot.loadPlugin(enderPlugin);

bot.once("spawn", async () => {
  const block = bot.findBlock({
    matching: (b) => b.name !== "air",
    maxDistance: 16
  });

  if (block) {
    const success = await bot.ender.pearl(block);
    console.log("Pearl result:", success);
  }
});
import { AABB } from "@nxg-org/mineflayer-util-plugin";
import { Vec3 } from "vec3";

const targetPos = new Vec3(10.5, 65.5, -20.5);
const targetAABB = new AABB(10, 65, -21, 11, 66, -20);
const success = await bot.ender.pearlAABB(targetAABB, targetPos);

There is also a chat-driven usage example in example/basic.ts.


  • targetAABB is expected to be in world coordinates (not a unit/local box).
  • targetPos should describe the same world-space target region as targetAABB.
  • bot.ender.pearl(block, face?) returns false when no valid shot is found or no pearls are available.
  • bot.ender.pearlAABB(targetAABB, targetPos, face?) is the generic high-level throw API.
  • shotToBlock() can be used to inspect a candidate shot before actually throwing.
  • shotToAABB() can be used to inspect a candidate AABB shot before actually throwing.
  • Look-send synchronization uses Mineflayer's move event, not private internal fields.
  • Off-hand support exists on the Enderman instance through useOffhand.

| Link | Description | | --- | --- | | API | Full API reference for the plugin, public classes, types, and method behavior. | | Example | A simple example showing pearl and follow commands. |


This package is published as GPL-3.0 in package.json.