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

flayercaptcha

v1.0.6

Published

| <sub>EN</sub> [English](README.md) | <sub>RU</sub> [Русский](README_ru.md) | |---------------------------------------|--------------------------------------|

Downloads

301

Readme

FlayerCaptcha

| EN English | RU Русский | |---------------------------------------|--------------------------------------|

FlayerCaptcha is a module for Mineflayer bots that simplifies working with map images in frames and inventory.

Installation

npm i flayercaptcha

FlayerCaptcha Initialization

const mineflayer = require('mineflayer');
const FlayerCaptcha = require('flayercaptcha');

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

const captcha = new FlayerCaptcha(bot, {
  delay: 10,
  isStopped: false
});

Configuration parameters:

  • delay — delay in milliseconds before the final image assembly (default is 10).
  • isStopped — if true, the module does not process new data until captcha.resume() is called (default is false).
captcha.stop();   // pauses processing
captcha.resume(); // resumes processing

imageReady Event

Triggered when the final image from multiple frames is ready.

Usage Example

captcha.on('imageReady', async ({ data, image }) => {
  console.log('Image data received:');
  console.table({
    ViewDir: data.viewDirection,
    MinDistance: data.minDistance,
    Facing: data.facing
  });

  // Frame data
  for (const frame of data.frames) {
    console.table({
      EntityFrameId: frame.entityFrameId,
      MapId: frame.mapId,
      Rotate: frame.rotate,
      Coordinate: `x:${frame.coordinate.x}, y:${frame.coordinate.y}, z:${frame.coordinate.z}`,
      Distance: frame.distance
    });
    // Additional data: frame.nbtData
  }

  const filename = `image_${data.minDistance}.png`;
  await image.toFile(filename);
  console.log(`Image saved as ${filename}`);
});

Arguments:

  • data — object with information about the assembled image:
    • viewDirection — view direction
    • minDistance — minimum distance to frames
    • facing — direction of the frame relative to the bot's view. Possible values: "forward", "left", "right", "back", "up", "down".
    • frames — array of objects with data about each frame (see below)
  • image — image object (Sharp)

frameInfo Event

Triggered when a frame with an image is detected.

Usage Example

captcha.on('frameInfo', async ({ data, image }) => {
  console.log('Frame data received:');
  console.table({
    EntityFrameId: data.entityFrameId,
    MapId:         data.mapId,
    Rotate:        data.rotate,
    Coordinate:    `x:${data.coordinate.x}, y:${data.coordinate.y}, z:${data.coordinate.z}`,
    ViewDir:       data.viewDirection,
    Distance:      data.distance,
    Facing:        data.facing,
  });
  // Additional data: data.nbtData

  const filename = `frame_${data.entityFrameId}.png`;
  await image.toFile(filename);
  console.log(`Image saved as ${filename}`);
});

Arguments:

  • data — object with frame data:

    • entityFrameId — frame entity ID
    • mapId — map ID
    • rotate — rotation value of the item inside the frame
    • coordinate — frame coordinates { x, y, z }
    • viewDirection — frame view direction
    • nbtData — metadata of the item inside the frame
    • distance — distance from the bot to the frame
    • facing — direction of the frame relative to the bot's view. Possible values: "forward", "left", "right", "back", "up", "down".
  • image — image object (Sharp)

inventoryInfo Event

Triggered when a map is detected in the bot's inventory.

Usage Example

captcha.on('inventoryInfo', async ({ data, image }) => {
  console.log(`Data for map ${data.mapId} in inventory received:`);
  for (const slot of data.slots) {
    console.log('SlotId:', slot.slotId);
    console.log('Item:', slot.item);
  }

  const filename = `inventory_${data.mapId}.png`;
  await image.toFile(filename);
  console.log(`Image saved as ${filename}`);
});

Arguments:

  • data — object with data about the map in inventory:

    • slots — inventory slots where maps were found. Each slot contains:
      • slotId — inventory slot ID
      • item — map item with its data
    • mapId — map ID
  • image — image object (Sharp)