Important: If you’re looking to contribute to this project, you will find the technical documentation more helpful.s
This project provides a simple approach for interacting with the game Minecraft through code.
An action represents a task or operation that the bot can perform. Actions are the building blocks of the bot's behavior, and multiple actions can be executed simultaneously or sequentially.
Example:
Suppose you have a mining bot in a game that needs to gather resources from a specific mining spot. You would assign the bot a "move" action to navigate to the mining location. Once the bot reaches the spot, it would then perform a "mine" action to collect the resources. After completing the mining action, the bot would execute another action, such as sending a message in the chat saying, "Finished mining at the location," to notify the user that the task is complete.
The Store is where all the state of the bot's client and world is stored. It includes client version, bot username, loaded chunks, nearby entities, server data, chat history, and more. Essentially, everything the Minecraft client sends is stored here.
An event listener monitors specific events in the bot's environment and triggers a response when those events occur.
Example:
Imagine you have a security bot in a game that guards a valuable chest. An event listener is set up to detect when any hostile mob enters a certain radius around the chest. When a mob gets too close, the event listener triggers the bot to initiate an attack sequence. The bot then targets the approaching mob, engages in combat, and eliminates the threat to protect the chest. This automatic response ensures the chest remains safe without needing constant user supervision.
A layer is a collection of actions grouped together for better control and management. Layers allow you to pause, resume, or clear a set of actions as needed.
Example:
Imagine you have a farming bot that is simultaneously harvesting crops and replanting seeds in a game. These actions are grouped into a "farming" layer. Suddenly, an event occurs: a hostile mob appears nearby. To prevent the bot from being distracted or damaged while farming, the event listener triggers the bot to pause the "farming" layer. All harvesting and replanting actions are paused, allowing the bot to focus solely on engaging and eliminating the mob. Once the threat is dealt with, the bot resumes the "farming" layer, continuing its previous tasks without interruption.