Create Minecraft bots with a powerful, stable, and high level JavaScript API.
- Supports Minecraft 1.8, 1.9, 1.10 and 1.11.
- 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.
- Chat.
- Brewing stands, and anvils.
- Better physics (support doors, ladders, water, etc).
var mineflayer = require('mineflayer');
var bot = mineflayer.createBot({
host: "localhost", // optional
port: 25565, // optional
username: "email@example.com", // email and password are required only for
password: "12345678", // online-mode=true servers
});
bot.on('chat', function(username, message) {
if (username === bot.username) return;
bot.chat(message);
});
- In the examples folder.
- vogonistic's REPL bot
Mineflayer is pluggable; anyone can create a plugin that adds an even higher level API on top of Mineflayer.
- 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
- Armor Manager - automatic armor managment
- Bloodhound - determine who and what is responsible for damage to another entity
- rom1504/rbot
- Darthfett/Helperbot
- vogonistic/voxel - visualize what the bot is up to using voxel.js
- [JonnyD/Skynet] (https://github.com/JonnyD/Skynet) - log player activity onto an online API
- [MinecraftChat] (https://github.com/rom1504/MinecraftChat) (last open source version, built by AlexKvazos) - Minecraft web based chat client https://minecraftchat.net/
- [Cheese Bot] (https://github.com/Minecheesecraft/Cheese-Bot) - Plugin based bot with a clean GUI. Made with Node-Webkit. http://bot.ezcha.net/
npm install mineflayer
- Follow the Windows instructions from node-minecraft-protocol
npm install mineflayer
- See doc/api.md.
- See doc/history.md.
- See examples/.
- See doc/unstable_api.md.
- See doc/contribute.md.
npm test
- 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.