{"name":"mineflayer","version":"3.3.2","description":"create minecraft bots with a stable, high level API","main":"index.js","types":"index.d.ts","scripts":{"test":"mocha --reporter spec --exit","pretest":"npm run lint","lint":"standard","fix":"standard --fix","prepublishOnly":"cp docs/README.md README.md"},"repository":{"type":"git","url":"git://github.com/PrismarineJS/mineflayer.git"},"engines":{"node":">=14"},"license":"MIT","dependencies":{"minecraft-data":"^2.79.0","minecraft-protocol":"^1.17.0","prismarine-biome":"^1.1.0","prismarine-block":"^1.6.0","prismarine-chat":"^1.0.0","prismarine-chunk":"^1.20.3","prismarine-entity":"^1.0.0","prismarine-item":"^1.6.0","prismarine-physics":"^1.0.4","prismarine-recipe":"^1.1.0","prismarine-windows":"^2.2.0","prismarine-world":"^3.5.0","protodef":"^1.8.0","typed-emitter":"^1.2.0","vec3":"^0.1.6"},"devDependencies":{"@types/node":"^14.0.1","doctoc":"^2.0.0","minecraft-wrap":"^1.2.1","mineflayer":"file:.","mocha":"^8.0.1","standard":"^16.0.1"},"gitHead":"ef4cc020ba836d3ebfaaeca1665f3b7caf19cb82","bugs":{"url":"https://github.com/PrismarineJS/mineflayer/issues"},"homepage":"https://github.com/PrismarineJS/mineflayer#readme","_id":"mineflayer@3.3.2","_nodeVersion":"14.0.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-KGehYXzk7yIy9bv9wBDBa7xV9fX+X8QAeJ2bupMA/yJM11TZD3/GKg2/czXXGuhRaL4zuRvqNnnz33hUrWTZTw==","shasum":"158688c0752f1ad7a97bbf2eb2e1b04fc47707e6","tarball":"http://registry-npm.ywwl.com/mineflayer/download/mineflayer-3.3.2.tgz","fileCount":120,"unpackedSize":526561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUBIpCRA9TVsSAnZWagAAaikP/3o626f8ivMPKi+gpOt2\npMOFj6H06tlto2/p7axUpcZAfCbUquHQuA9t+m2wTLvUwTyi0biNNLxwrbtr\nQngFLO1vncCLjfmrZwHizmTQAtquSNp0ncImw0N6J4+1KOwO03pKjaYueQon\ncsHVOMff+N/BvhfnlVHodZtiMKw6hrn04Iw4Y/2lYee6s0Fp4N5KiJiaV/sO\n5cTtl+Z6JZKrIzmRta+6nzEV5/WyCqnR54UtJzQXECcpzfu+tT4v+3BQjau/\nUks5BI0S5e2c2dRSd/j2oMoP/elMhi0Xtmh36e5hczkYt7Z6iwwGl4o2BUTY\nR+E1OaVEkP/mBgt9nzY6IpVmyAyTR1ap1VaORL6B/RzuBLpbqXdHkG7Kvk8N\n4Pgxz+dtf7nv3t+NVZUPLCDHdihMIOSVh+EyLM/cGGxgBVegTYa35t+4z8uG\n24WVFBXR/0eoCbBWZ4l4XkwYZ7OUkqdNS4j6D71NINnnCpTEDg7fLGGjHCsP\nmaHg2IRhSSLbQLrvr/PMiXN+0QJCnX+geiMvvSn5JoYxM3i2Wk96XHf6M1n0\nwO5iaPVTw4XN/nnkXF0o7mphnr1Su/kTfuZrmlVBOmhbA0YU5WkU4T9WCRq6\n2baYpTvWvdda+f6aD86hyP1/xaWZ2dlt8gXpNNmoHMC9HOqwd+yXMdXOzCQP\nViVr\r\n=1amD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1I43mkmZMCGaElPR6jnxeLN0RpVtY+awHCcu36OH0FAIhAOJS3i5IMzJ0FqGFfIlTuM1gvfk0n7fMvw/+szaTdsHX"}],"size":139781,"noattachment":false,"key":"/mineflayer/-/mineflayer-3.3.2.tgz"},"_npmUser":{"name":"rom1504","email":"romain.rom1@gmail.com"},"directories":{},"maintainers":[{"name":"rom1504","email":"romain.rom1@gmail.com"},{"name":"superjoe","email":"andrew@ziglang.org"},{"name":"zuazo","email":"xabier@zuazo.org"},{"name":"roblabla","email":"robinlambertz.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mineflayer_3.3.2_1615860264688_0.9466157692901636"},"_hasShrinkwrap":false,"readme":"# Mineflayer\n\n[![NPM version](https://img.shields.io/npm/v/mineflayer.svg?color=success&label=npm%20package&logo=npm)](https://www.npmjs.com/package/mineflayer)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/PrismarineJS/mineflayer/ci.yml.svg?label=CI&logo=github&logoColor=lightgrey)](https://github.com/PrismarineJS/mineflayer/actions?query=workflow%3A%22CI%22)\n[![Try it on gitpod](https://img.shields.io/static/v1.svg?label=try&message=on%20gitpod&color=brightgreen&logo=gitpod)](https://gitpod.io/#https://github.com/PrismarineJS/mineflayer)\n[![Open In Colab](https://img.shields.io/static/v1.svg?label=open&message=on%20colab&color=blue&logo=google-colab)](https://colab.research.google.com/github/PrismarineJS/mineflayer/blob/master/docs/mineflayer.ipynb)\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/PrismarineJS)](https://github.com/sponsors/PrismarineJS)\n\n[![Official Discord](https://img.shields.io/static/v1.svg?label=OFFICIAL&message=DISCORD&color=blue&logo=discord&style=for-the-badge)](https://discord.gg/GsEFRM8)\n\n| <sub>EN</sub> [English](README.md) | <sub>RU</sub> [русский](ru/README_RU.md) | <sub>ES</sub> [Español](es/README_ES.md) | <sub>FR</sub> [Français](fr/README_FR.md) | <sub>TR</sub> [Türkçe](tr/README_TR.md) | <sub>ZH</sub> [中文](zh/README_ZH_CN.md) | <sub>BR</sub> [Português](br/README_BR.md) |\n|-------------------------|----------------------------|----------------------------|----------------------------|----------------------------|-------------------------|--------------------|\n\nCreate Minecraft bots with a powerful, stable, and high level JavaScript [API](api.md), also usable from Python.\n\nFirst time using Node.js? You may want to start with the [tutorial](tutorial.md). Know Python? Checkout some [Python examples](https://github.com/PrismarineJS/mineflayer/tree/master/examples/python) and try out [Mineflayer on Google Colab](https://colab.research.google.com/github/PrismarineJS/mineflayer/blob/master/docs/mineflayer.ipynb).\n\n## Features\n\n * Supports Minecraft 1.8 to 1.20.4 (1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19 and 1.20)\n * Entity knowledge and tracking.\n * Block knowledge. You can query the world around you. Milliseconds to find any block.\n * Physics and movement - handle all bounding boxes\n * Attacking entities and using vehicles.\n * Inventory management.\n * Crafting, chests, dispensers, enchantment tables.\n * Digging and building.\n * Miscellaneous stuff such as knowing your health and whether it is raining.\n * Activating blocks and using items.\n * Chat.\n\n### Roadmap\n\n Checkout [this page](https://github.com/PrismarineJS/mineflayer/wiki/Big-Prismarine-projects) to see what our current projects are.\n\n## Installation\n\nFirst install Node.js >= 18 from [nodejs.org](https://nodejs.org/) then:\n\n```bash\nnpm install mineflayer\n```\n\nTo update mineflayer (or any Node.js) package and its dependencies, use \n```bash\nnpm update --depth 9999\n```\n\n## Documentation\n\n| link | description |\n|---|---|\n|[tutorial](tutorial.md) | Begin with Node.js and mineflayer |\n| [FAQ.md](FAQ.md) | Got a question ? go there first |\n| **[api.md](api.md)** <br/>[unstable_api.md](unstable_api.md) | The full API reference |\n| [history.md](history.md) | The changelog for mineflayer |\n| [examples/](https://github.com/PrismarineJS/mineflayer/tree/master/examples) | Checkout all the mineflayer examples |\n\n\n## Contribute\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) and [prismarine-contribute](https://github.com/PrismarineJS/prismarine-contribute)\n\n## Usage\n\n**Videos**\n\nA tutorial video explaining the basic set up process for a bot can be found [here.](https://www.youtube.com/watch?v=ltWosy4Z0Kw)\n\nIf you want to learn more, more video tutorials are [there,](https://www.youtube.com/playlist?list=PLh_alXmxHmzGy3FKbo95AkPp5D8849PEV) and the corresponding source codes for those bots is [there.](https://github.com/TheDudeFromCI/Mineflayer-Youtube-Tutorials)\n\n[<img src=\"https://img.youtube.com/vi/ltWosy4Z0Kw/0.jpg\" alt=\"tutorial 1\" width=\"200\">](https://www.youtube.com/watch?v=ltWosy4Z0Kw)\n[<img src=\"https://img.youtube.com/vi/UWGSf08wQSc/0.jpg\" alt=\"tutorial 2\" width=\"200\">](https://www.youtube.com/watch?v=UWGSf08wQSc)\n[<img src=\"https://img.youtube.com/vi/ssWE0kXDGJE/0.jpg\" alt=\"tutorial 3\" width=\"200\">](https://www.youtube.com/watch?v=ssWE0kXDGJE)\n[<img src=\"https://img.youtube.com/vi/walbRk20KYU/0.jpg\" alt=\"tutorial 4\" width=\"200\">](https://www.youtube.com/watch?v=walbRk20KYU)\n\n**Getting Started**\n\nWithout a version specified, the version of the server will be guessed automatically.\nWithout auth specified, the mojang auth style will be guessed.\n\n### Echo Example\n```js\nconst mineflayer = require('mineflayer')\n\nconst bot = mineflayer.createBot({\n  host: 'localhost', // minecraft server ip\n  username: 'Bot', // username to join as if auth is `offline`, else a unique identifier for this account. Switch if you want to change accounts\n  auth: 'microsoft' // for offline mode servers, you can set this to 'offline'\n  // port: 25565,              // set if you need a port that isn't 25565\n  // version: false,           // only set if you need a specific version or snapshot (ie: \"1.8.9\" or \"1.16.5\"), otherwise it's set automatically\n  // password: '12345678'      // set if you want to use password-based auth (may be unreliable). If specified, the `username` must be an email\n})\n\nbot.on('chat', (username, message) => {\n  if (username === bot.username) return\n  bot.chat(message)\n})\n\n// Log errors and kick reasons:\nbot.on('kicked', console.log)\nbot.on('error', console.log)\n```\n\nIf `auth` is set to `microsoft`, you will be prompted to login to microsoft.com with a code in your browser. After signing in on your browser, \nthe bot will automatically obtain and cache authentication tokens (under your specified username) so you don't have to sign-in again. \n\nTo switch the account, update the supplied `username`. By default, cached tokens will be stored in your user's .minecraft folder, or if `profilesFolder` is specified, they'll instead be stored there.\nFor more information on bot options see node-minecraft-protocol's [API doc](https://github.com/PrismarineJS/node-minecraft-protocol/blob/master/docs/API.md#mccreateclientoptions).\n\n#### Connecting to a Realm\n\nTo join a Realm that your Minecraft account has been invited to, you can pass a `realms` object with a selector function like below.\n\n```js\nconst client = mineflayer.createBot({\n  username: 'email@example.com', // minecraft username\n  realms: {\n    // This function is called with an array of Realms the account can join. It should return the one it wants to join.\n    pickRealm: (realms) => realms[0]\n  },\n  auth: 'microsoft'\n})\n```\n\n### See what your bot is doing\n\nThanks to the [prismarine-viewer](https://github.com/PrismarineJS/prismarine-viewer) project, it's possible to display in a browser window what your bot is doing.\nJust run `npm install prismarine-viewer` and add this to your bot:\n```js\nconst { mineflayer: mineflayerViewer } = require('prismarine-viewer')\nbot.once('spawn', () => {\n  mineflayerViewer(bot, { port: 3007, firstPerson: true }) // port is the minecraft server port, if first person is false, you get a bird's-eye view\n})\n```\nAnd you'll get a *live* view looking like this:\n\n[<img src=\"https://prismarinejs.github.io/prismarine-viewer/test_1.16.1.png\" alt=\"viewer\" width=\"500\">](https://prismarinejs.github.io/prismarine-viewer/)\n\n#### More Examples\n\n| example | description |\n|---|---|\n|[viewer](https://github.com/PrismarineJS/mineflayer/tree/master/examples/viewer) | Display your bot world view in the browser |\n|[pathfinder](https://github.com/PrismarineJS/mineflayer/tree/master/examples/pathfinder) | Make your bot go to any location automatically |\n|[chest](https://github.com/PrismarineJS/mineflayer/blob/master/examples/chest.js) | Use chests, furnaces, dispensers, enchantment tables |\n|[digger](https://github.com/PrismarineJS/mineflayer/blob/master/examples/digger.js) | Learn how to create a simple bot that is capable of digging blocks |\n|[discord](https://github.com/PrismarineJS/mineflayer/blob/master/examples/discord.js) | Connect a discord bot with a mineflayer bot |\n|[jumper](https://github.com/PrismarineJS/mineflayer/blob/master/examples/jumper.js) | Learn how to move, jump, ride vehicles, attack nearby entities |\n|[ansi](https://github.com/PrismarineJS/mineflayer/blob/master/examples/ansi.js) | Display your bot's chat with all of the chat colors shown in your terminal |\n|[guard](https://github.com/PrismarineJS/mineflayer/blob/master/examples/guard.js) | Make a bot guard a defined area from nearby mobs |\n|[multiple-from-file](https://github.com/PrismarineJS/mineflayer/blob/master/examples/multiple_from_file.js) | Add a text file with accounts and have them all login |\n\nAnd many more in the [examples](https://github.com/PrismarineJS/mineflayer/tree/master/examples) folder.\n\n### Modules\n\nA lot of the active development is happening inside of small npm packages which are used by mineflayer.\n\n#### The Node Way&trade;\n\n> \"When applications are done well, they are just the really application-specific, brackish residue that can't be so easily abstracted away. All the nice, reusable components sublimate away onto github and npm where everybody can collaborate to advance the commons.\" — substack from [\"how I write modules\"](https://gist.github.com/substack/5075355)\n\n#### Modules\n\nThese are the main modules that make up mineflayer:\n\n| module | description |\n|---|---|\n| [minecraft-protocol](https://github.com/PrismarineJS/node-minecraft-protocol) | Parse and serialize minecraft packets, plus authentication and encryption.\n| [minecraft-data](https://github.com/PrismarineJS/minecraft-data) | Language independent module providing minecraft data for minecraft clients, servers and libraries.\n| [prismarine-physics](https://github.com/PrismarineJS/prismarine-physics) | Provide the physics engine for minecraft entities\n| [prismarine-chunk](https://github.com/PrismarineJS/prismarine-chunk) | A class to hold chunk data for Minecraft\n| [node-vec3](https://github.com/PrismarineJS/node-vec3) | 3d vector math with robust unit tests\n| [prismarine-block](https://github.com/PrismarineJS/prismarine-block) | Represent a minecraft block with its associated data\n| [prismarine-chat](https://github.com/PrismarineJS/prismarine-chat) | A parser for a minecraft chat message (extracted from mineflayer)\n| [node-yggdrasil](https://github.com/PrismarineJS/node-yggdrasil) | Node.js library to interact with Mojang's authentication system, known as Yggdrasil\n| [prismarine-world](https://github.com/PrismarineJS/prismarine-world) | The core implementation of worlds for prismarine\n| [prismarine-windows](https://github.com/PrismarineJS/prismarine-windows) | Represent minecraft windows\n| [prismarine-item](https://github.com/PrismarineJS/prismarine-item) | Represent a minecraft item with its associated data\n| [prismarine-nbt](https://github.com/PrismarineJS/prismarine-nbt) | An NBT parser for node-minecraft-protocol\n| [prismarine-recipe](https://github.com/PrismarineJS/prismarine-recipe) | Represent minecraft recipes\n| [prismarine-biome](https://github.com/PrismarineJS/prismarine-biome) | Represent a minecraft biome with its associated data\n| [prismarine-entity](https://github.com/PrismarineJS/prismarine-entity) | Represent a minecraft entity\n\n\n### Debug\n\nYou can enable some protocol debugging output using `DEBUG` environment variable:\n\n```bash\nDEBUG=\"minecraft-protocol\" node [...]\n```\n\nOn windows :\n```\nset DEBUG=minecraft-protocol\nnode your_script.js\n```\n\n## Third Party Plugins\n\nMineflayer is pluggable; anyone can create a plugin that adds an even\nhigher level API on top of Mineflayer.\n\nThe most updated and useful are :\n\n * [pathfinder](https://github.com/Karang/mineflayer-pathfinder) - advanced A* pathfinding with a lot of configurable features\n * [prismarine-viewer](https://github.com/PrismarineJS/prismarine-viewer) - simple web chunk viewer\n * [web-inventory](https://github.com/ImHarvol/mineflayer-web-inventory) - web based inventory viewer\n * [statemachine](https://github.com/PrismarineJS/mineflayer-statemachine) - A state machine API for more complex bot behaviors\n * [Armor Manager](https://github.com/G07cha/MineflayerArmorManager) - automatic armor management\n * [Dashboard](https://github.com/wvffle/mineflayer-dashboard) - Frontend dashboard for mineflayer bot\n * [PVP](https://github.com/PrismarineJS/mineflayer-pvp) - Easy API for basic PVP and PVE.\n * [Auto Eat](https://github.com/link-discord/mineflayer-auto-eat) - Automatic eating of food.\n * [Auto Crystal](https://github.com/link-discord/mineflayer-autocrystal) - Automatic placing & breaking of end crystals.\n * [Tool](https://github.com/TheDudeFromCI/mineflayer-tool) - A utility for automatic tool/weapon selection with a high level API.\n * [Hawkeye](https://github.com/sefirosweb/minecraftHawkEye) - A utility for using auto-aim with bows.\n * [GUI](https://github.com/firejoust/mineflayer-GUI) - Interact with nested GUI windows using async/await\n * [Projectile](https://github.com/firejoust/mineflayer-projectile) - Get the required launch angle for projectiles\n * [Movement](https://github.com/firejoust/mineflayer-movement) - Smooth and realistic player movement, best suited for PvP\n * [Collect Block](https://github.com/PrismarineJS/mineflayer-collectblock) - Quick and simple block collection API.\n\n But also check out :\n\n * [radar](https://github.com/andrewrk/mineflayer-radar/) - web based radar\n   interface using canvas and socket.io. [YouTube Demo](https://www.youtube.com/watch?v=FjDmAfcVulQ)\n * [auto-auth](https://github.com/G07cha/MineflayerAutoAuth) - chat-based bot authentication\n * [Bloodhound](https://github.com/Nixes/mineflayer-bloodhound) - determine who and what is responsible for damage to another entity\n * [tps](https://github.com/SiebeDW/mineflayer-tps) - get the current tps (processed tps)\n * [panorama](https://github.com/IceTank/mineflayer-panorama) - take Panorama Images of your world\n * [player-death-event](https://github.com/tuanzisama/mineflayer-death-event) - emit player death event in Mineflayer.\n\n## Projects Using Mineflayer\n\n * [Voyager](https://github.com/MineDojo/Voyager) An Open-Ended Embodied Agent with Large Language Models\n * [rom1504/rbot](https://github.com/rom1504/rbot)\n   - [YouTube - building a spiral staircase](https://www.youtube.com/watch?v=UM1ZV5200S0)\n   - [YouTube - replicating a building](https://www.youtube.com/watch?v=0cQxg9uDnzA)\n * [Darthfett/Helperbot](https://github.com/Darthfett/Helperbot)\n * [vogonistic/voxel](https://github.com/vogonistic/mineflayer-voxel) - visualize what\n   the bot is up to using voxel.js\n * [JonnyD/Skynet](https://github.com/JonnyD/Skynet) -  log player activity onto an online API\n * [MinecraftChat](https://github.com/rom1504/MinecraftChat) (last open source version, built by AlexKvazos) -  Minecraft web based chat client\n * [Cheese Bot](https://github.com/Minecheesecraft/Cheese-Bot) - Plugin based bot with a clean GUI. Made with Node-Webkit.\n * [Chaoscraft](https://github.com/schematical/chaoscraft) - Minecraft bot using genetic algorithms, see [its youtube videos](https://www.youtube.com/playlist?list=PLLkpLgU9B5xJ7Qy4kOyBJl5J6zsDIMceH)\n * [hexatester/minetelegram](https://github.com/hexatester/minetelegram) -  Minecraft - Telegram bridge, build on top of mineflayer & telegraf.\n * [PrismarineJS/mineflayer-builder](https://github.com/PrismarineJS/mineflayer-builder) - Prints minecraft schematics in survival, keeping orientation\n * [SilkePilon/OpenDeliveryBot](https://github.com/SilkePilon/OpenDeliveryBot) - Minecraft bot in python to deliver items from place to place.\n * [and hundreds more](https://github.com/PrismarineJS/mineflayer/network/dependents) - All the projects that github detected are using mineflayer\n\n\n## Testing\n\n### Testing everything\n\nSimply run: \n\n```bash\nnpm test\n```\n\n### Testing specific version\nRun \n\n```bash\nnpm run mocha_test -- -g <version>\n```\n\nwhere `<version>` is a minecraft version like `1.12`, `1.15.2`...\n\n### Testing specific test\nRun \n\n```bash\nnpm run mocha_test -- -g <test_name>\n```\n\nwhere `<test_name>` is a name of the test like `bed`, `useChests`, `rayTrace`...\n\n### Example\n\n```bash\nnpm run mocha_test -- -g \"1.18.1.*BlockFinder\"\n```\nto run the block finder test for 1.18.1\n\n## License\n\n[MIT](/LICENSE)\n","publish_time":1615860265051,"_cnpm_publish_time":1615860265051,"dist-tags":{"latest":"4.39.0"}}