Code Monkey home page Code Monkey logo

mineflayer's Introduction

Mineflayer

NPM version Build Status Join the chat at https://gitter.im/PrismarineJS/node-minecraft-protocol

Create Minecraft bots with a powerful, stable, and high level JavaScript API.

Features

  • Supports Minecraft 1.8.3.
  • 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.

Roadmap

  • Brewing stands, and anvils.
  • Better physics (support doors, ladders, water, etc).

Usage

Echo Example

var mineflayer = require('mineflayer');
var bot = mineflayer.createBot({
  host: "localhost", // optional
  port: 25565,       // optional
  username: "[email protected]", // 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);
});

More Examples

Third Party Plugins

Mineflayer is pluggable; anyone can create a plugin that adds an even higher level API on top of Mineflayer.

Projects Using Mineflayer

Installation

Linux / OSX

npm install mineflayer

Windows

  1. Follow the Windows instructions from node-minecraft-protocol
  2. npm install mineflayer

Documentation

Testing

npm test

Updating to a newer protocol version

  1. Wait for a new version of node-minecraft-protocol to be released which supports the new Minecraft version.
  2. npm install --save minecraft-protocol@latest
  3. Apply the protocol changes where necessary.
  4. Run the test suite. See Testing above.

Licence

MIT

mineflayer's People

Contributors

andrewrk avatar thejoshwolfe avatar darthfett avatar rom1504 avatar roblabla avatar deathcap avatar zuazo avatar nevercast avatar vogonistic avatar pietro210 avatar corgano avatar crazy2be avatar pratham2003 avatar kupferhirn avatar demipixel avatar alexkvazos avatar wallbraker avatar jonnyd avatar bored-engineer avatar benjajaja avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.