Cookie MineBot is a Minecraft bot written in JavaScript using the mineflayer package. It comes with a high level API wrapper for the mineflayer bot class to make coding much easier.
This is the documentation for the Bot class. It is a wrapper around the mineflayer bot instance to make coding minecraft bots easier.
Additional information such as return values can be found by hovering over typed-out methods in VSCode or by looking it up in the lib\Bot.js file.
This is the original mineflayer bot instance.
This is data from the minecraft-data package for the 1.17.1 version.
This makes the bot send a message and send it multiple times with a delay if specified.
msgis a string representing the message to send.amountis a number representing the amount of times the message should be sent.delayis a number representing the time to wait between sending the messages in ms.
This makes the bot drop an item or multiple if specified.
itemis a string or a number representing the name or the ID of the item to drop.countis a number representing the amount of items to drop.
This makes the bot go to the given coordinates.
x,y,zare numbers representing the coordinates of the block to go to.
This makes the bot follow a player if they are in sight.
playeris a string of the players name you want to follow.rangeis the distance the bot will hold to the player.
This makes the bot follow the nearest entity of the type type.
typeis a string representing an entity type e.g. 'cow', 'player'.rangeis the disctance the bot will hold to the entity.
This makes the bot stop pathfinding to the current goal.
This will cancel actions like bot.followPlayer() or bot.goTo().
This makes the process stop for a given time.
msis a number representing the amount of time to wait in ms.