Miss any of our Open RFC calls?Watch the recordings here! »

mineflayer-quarry

0.0.1 • Public • Published

mineflayer-quarry

NPM version Quarry operation for mineflayer

This plugin requires mineflayer-navigate.

Usage

Mineflayer = require 'mineflayer'
Quarry = (require 'mineflayer-quarry') Mineflayer
 
Bot = Mineflayer.createBot
    username: "Digger"
 
# Inject Quarry 
Quarry Bot
 
Bot.on 'chat'(User, Msg) ->
    return if User == Bot.username
    if Msg == 'shaft'
        # Dig a 5x5 centered around the player 
        Player = Bot.players[User]
        if Player.entity
            Corners = Bot.quarry.getCorners Player.entity.position5
            Bot.chat 'Starting quarry'
            Result = Bot.quarry.shaft
                Corners: Corners
            if Result.status != 'ok'
                Bot.chat 'Error: ' + Result.message
 
        else
            Bot.chat 'Error: You\'re too far away!'
 
Bot.once 'spawn'-> Bot.chat 'Please ensure I have a pickaxe to mine with'

Install

npm i mineflayer-quarry

DownloadsWeekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

3.11 kB

Total Files

4

Last publish

Collaborators

  • avatar