{"name":"mineflayer","version":"2.28.0","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 && require-self","lint":"standard","fix":"standard --fix","prepare":"npm install require-self && require-self","prepublishOnly":"cp docs/README.md README.md"},"repository":{"type":"git","url":"git://github.com/PrismarineJS/mineflayer.git"},"engines":{"node":">=10"},"license":"MIT","dependencies":{"minecraft-data":"^2.62.1","minecraft-protocol":"^1.13.0","prismarine-biome":"^1.1.0","prismarine-block":"^1.6.0","prismarine-chat":"^1.0.0","prismarine-chunk":"^1.20.1","prismarine-entity":"^1.0.0","prismarine-item":"^1.5.0","prismarine-physics":"^1.0.4","prismarine-recipe":"^1.1.0","prismarine-windows":"^1.5.0","prismarine-world":"^3.1.0","protodef":"^1.8.0","typed-emitter":"^1.2.0","vec3":"^0.1.6"},"devDependencies":{"@types/node":"^14.0.1","doctoc":"^1.0.0","minecraft-wrap":"^1.2.1","mocha":"^8.0.1","require-self":"^0.2.3","standard":"^14.0.1"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2015 Andrew Kelley\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"mineflayer@2.28.0","dist":{"shasum":"ee7229aa852963d9ba699596c0b8e973cdbb0e5a","integrity":"sha512-IovRrSdNllI3XFQ80NHsCumDx0P1f3C2IY8usnKgtPl2BOfQhRsucOxt7By9dBzsy8klBr3AVyzAYbi9VYfcuQ==","tarball":"http://registry-npm.ywwl.com/mineflayer/download/mineflayer-2.28.0.tgz","fileCount":122,"unpackedSize":459094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNw1rCRA9TVsSAnZWagAA3OUP/iL0FjMxCuTMqj0pGAv/\nIGQUwzISfOeWr1ogqyVwE5XXBfTPkwPfZzaCcQKgxWBRUAt4BofE/uF1kkxl\nWAHpPcwLan/1AfWHpwh6C3LhZ08QJhwtcsjO3dRbrB+uJg1f7QBn2Oq3TNHw\nTPW+mGhp2EH6pvR1TzQx/3gHkJefueVZcaXDlptcM9zrR2FGLsMOf3Vp3Mlf\n9pLcDNh3a3JPYxP0rqy/sovSK26+dLSwGuGNIOhBw7SiqT6aRtRcNbx4eRT3\ngSDr7LOcCxg2b2slJiht4MS3VdR/1fWGdGqQkSb27PYgNxBCS5BqVxJkXjnH\n7HOLSP2ztA3Jh5Gq1bL9963LYDA9rrihtWIuV3f+Q/vsS/y19IfcFnCYoP86\nzPKPrI0cypN2aQIZ89qsIhF4F7coPcRB/xt/C3dHMmzTmhOpmuXzdbv21p53\nJ/saKPA0W5VjR/h2hsn5vXX/sFarKTznUAaaME2yF2s0QbSH/UEZr36wPfdt\nuEFLj1Ny0vCi6bXKUNxjdOGOQGsQ8C+zyig6GrE9OS2sYKBzuWg5pi67pkKe\njJMAyDWWHV+hsdW69pYlKZNC2K0Y9LR1/1n19KM5/VnjdPZ5mSoApdB2WubD\nYBms1bSliNzuR0cHfYp/afOCSXG11Ty9fN3rdiAXBUeWeR1n8Sw2YDFyAWJ+\nsBmm\r\n=Xi+b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAo6lNKWpUEgeVmJcurfvX/VeE+sYardpW2AVaq+U1pFAiEA90yXaDzJb30IIe6YNpSZo7Y0cAA7hl9PwXqCRF4uoTw="}],"size":122794,"noattachment":false,"key":"/mineflayer/-/mineflayer-2.28.0.tgz"},"maintainers":[{"name":"roblabla","email":"robinlambertz.dev@gmail.com"},{"name":"rom1504","email":"romain.rom1@gmail.com"},{"name":"superjoe","email":"superjoe30@gmail.com"},{"name":"zuazo","email":"xabier@onddo.com"}],"_npmUser":{"name":"rom1504","email":"romain.rom1@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mineflayer_2.28.0_1597443434471_0.2938459471562167"},"_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":1597443434611,"_cnpm_publish_time":1597443434611,"dist-tags":{"latest":"4.39.0"}}