github.com/adepierre/Botcraft ↗
Botcraft is a cross-platform C++ library to create bots that connect and interact with Minecraft servers with (optional) integrated OpenGL renderer
Open this visualization on its own page →
Contributors
9
Lines of Code
16,615
From
2019-07-23
To
2023-03-17
About adepierre/Botcraft
Botcraft is a C++ library for creating bots that connect to and interact with Minecraft servers, offering both headless operation and optional integrated OpenGL rendering. The project supports Minecraft versions from 1.12.2 through 1.26.1, handling both offline "cracked" mode and online authentication with Microsoft accounts. It implements the full Minecraft protocol through a sublibrary called ProtocolCraft, with packet names and structure kept as close as possible to Mojang's official source mappings.
The library includes a comprehensive behavior system based on behavior trees for programming bot logic, alongside built-in behaviors for pathfinding, block breaking, inventory management, crafting, and various entity interactions. Bots are extremely resource efficient, running AFK bots under 5 MB of RAM and other bots under 60 MB in headless mode. The project provides a custom testing framework to validate bot behaviors on vanilla servers and includes examples ranging from simple chat-based bots to complex autonomous builds like pixel art creation and world eaters where multiple bots coordinate without direct communication.
Botcraft emphasizes minimal external dependencies for its core functionality, relying primarily on ASIO for networking while keeping optional dependencies for compression, encryption, and rendering. The author develops it as a personal project updated roughly monthly, with precompiled binaries available for both Windows and Linux. While designed for vanilla servers, it can partially work with modded servers that don't require client-side mod communication, handling such packets as raw byte arrays for custom parsing.