|US English||RU Russian|
- Supports Minecraft 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15 and 1.16.
- Entity knowledge and tracking.
- Block knowledge. You can query the world around you.
- Basic physics and movement - currently blocks are either "solid" or "empty".
- Attacking entities and using vehicles.
- Inventory management.
- Crafting, chests, dispensers, enchantment tables.
- Digging and building.
- Miscellaneous stuff such as knowing your health and whether it is raining.
- Activating blocks and using items.
- Brewing stands, and anvils.
- Better physics (support doors, ladders, water, etc).
- Want to contribute on something important for PrismarineJS ? go to https://github.com/PrismarineJS/mineflayer/wiki/Big-Prismarine-projects
Without version specified, the version of the server will be guessed automatically, you can set a specific one using the version option.
var mineflayer = ;var bot = mineflayer;bot;bot
You can enable some protocol debugging output using
DEBUG environment variable:
DEBUG="minecraft-protocol" node [...]
On windows :
set DEBUG=minecraft-protocol node your_script.js
Third Party Plugins
Mineflayer is pluggable; anyone can create a plugin that adds an even higher level API on top of Mineflayer.
The most updated and useful are :
- pathfinder - advanced A* pathfinding with a lot of configurable features
- prismarine-viewer - simple web chunk viewer
- web-inventory - web based inventory viewer
- statemachine - A state machine API for more complex bot behavors
- Armor Manager - automatic armor managment
But also check out :
- navigate - get around easily using A* pathfinding. YouTube Demo
- radar - web based radar interface using canvas and socket.io. YouTube Demo
- blockfinder - find blocks in the 3D world
- scaffold - get to a target destination even if you have to build or break blocks to do so. YouTube Demo
- auto-auth - chat-based bot authentication
- Bloodhound - determine who and what is responsible for damage to another entity
- tps - get the current tps (processed tps)
Projects Using Mineflayer
- vogonistic/voxel - visualize what the bot is up to using voxel.js
- JonnyD/Skynet - log player activity onto an online API
- MinecraftChat (last open source version, built by AlexKvazos) - Minecraft web based chat client https://minecraftchat.net/
- Cheese Bot - Plugin based bot with a clean GUI. Made with Node-Webkit. http://bot.ezcha.net/
- Chaoscraft - Minecraft bot using genetic algorithms, see its youtube videos
- hexatester/minetelegram - Minecraft - Telegram bridge, build on top of mineflayer & telegraf.
npm install mineflayer
- See docs/api.md.
- See docs/FAQ.md.
- See docs/history.md.
- See examples/.
- See docs/unstable_api.md.
- See docs/CONTRIBUTING.md.
Some setup is required after first cloning the project but after that is done it's very easy to run them.
In order to get all tests to run successfully you must first:
- create a new folder in which to store minecraft server jars
- set the MC_SERVER_JAR_DIR to this folder
Where the "/full/path/to/" is the fully qualified path name.
Testing specific version
npm test -g <version>, where
<version> is a minecraft version like
Testing specific test
npm test -g <test_name>, where
<test_name> is a name of the test like
Updating to a newer protocol version
- Wait for a new version of node-minecraft-protocol to be released which supports the new Minecraft version.
npm install --save minecraft-protocol@latest
- Apply the protocol changes where necessary.
- Run the test suite. See Testing above.