Skip to content

Latest commit

 

History

History
19 lines (10 loc) · 679 Bytes

api.md

File metadata and controls

19 lines (10 loc) · 679 Bytes

API

Welcome to the Mineflayer-Tool API documentation page.

Table of Contents

1. Summary

  • bot.tool.equipForBlock(block: Block, options?: MiningEquipOptions, cb?: (err?: Error) => void): Promise<void>

    Can be used to instruct the bot to equip the best tool for mining the target block. Tools that are faster are considered better.

    Options:

    • requireHarvest: boolean

      If true, only tools that can harvest the item are considered. (I.e. requires iron pickaxe to mine diamond ore) If bot does not have a tool in it's inventory that can harvest the target block, an error is thrown.