Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Actions

Wekend edited this page Oct 13, 2024 · 7 revisions

You might be wondering how to actually make the bot do stuff in-game at this point. Well, this is it! With these two objects, you're able to read the environment around your bot and perform actions to automate tasks.

Mineflayer object

The global mineflayer object contains all methods and properties provided by Mineflayer. You can use this to read the bot's surroundings, perform actions as the bot, and loads more. All methods, properties, and functions are listed here.

Housatic object

The housatic object contains specialized methods provided by Housatic that are either useful for easy bot management or directly related to Housatic itself. Housatic provides a few built-in, which can be accessed by using the global housatic object.

Method Parameters Description
log message Adds message to Housatic's bot logs.
wait duration (ms) Returns a promise that's resolved length milliseconds later
leakChat message Adds message to a chat queue which releases messages at a steady rate of 1 message/second to avoid getting kicked for spam. Uses a leaky bucket algorithm with a regen rate of 1 token/s.
burstChat message Adds message to a chat queue which releases messages as fast as possible, until it is necessary to slow down to avoid getting kicked for spam. Uses a token bucket algorithm with a 9 token capacity and 1 token/s regeneration rate.
getLocation Returns a string depending on where the bot is. Returns house when in a house, lobby_housing when in the Housing lobby, lobby_other when in a different lobby, and limbo when in limbo.

Check here for example uses of the Housatic object!


Fantastic. This is, for the most part, all you need to create a great bot. If you need more advanced functionality though, continue reading! ➜

Clone this wiki locally