0.5.9 • Published 8 years ago

mcpi v0.5.9

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

mcpi

mcpi allows you to control Minecraft: Raspberry Pi edition server from Node.js. This is intended as a lower-level module, and is meant to be extended on for bigger projects. However, the commands are simple enough to play with as-is.

Usage

const mcpi = require('mcpi');
const mc = new mcpi.Minecraft('localhost', 4711);

// Use the mc variable to play with the server!
mc.chat.post('Yo dawg, I heard you like Node.js, so I put some Node.js in your Pi so you can Node.js while you Pi.');
mc.world.setBlock(3, 14, 15, mcpi.blocks.DiamondBlock);
mc.close();

// Use the returned promises to wait for results
mc.world.getBlock(3, 14, 15)
  .then(block => {
    console.log('blockId:', block.id);
  })
  .then(() => {
    mc.close();
  });
  

Debug logs

To turn on debug logging, run your program with NODE_DEBUG set to mcpi

0.5.9

8 years ago

0.5.8

8 years ago

0.5.7

8 years ago

0.5.6

8 years ago

0.5.5

8 years ago

0.5.4

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago