SmartBrainLib
A library for working with the mob artificial intelligence system in Minecraft that simplifies the use and management of the brain system.
What is this library?
The brain system in Minecraft is a new, rather mysterious entity AI system that Mojang introduced to handle more complex mobs and provide advanced entity management.
Unfortunately, Mojang's implementation leaves much to be desired - it's overly complex and inefficient. Because of this, using it instead of the existing goals system is practically impractical.
This library completely overhauls the brain system, making it truly usable and configurable. It's worth noting that the classic goals system is still simpler at first glance - the brain system is intended for more complex interactions, but it's also interesting to experiment with.
Key Features of SmartBrainLib
SBL offers a multifaceted approach to the brain system and will continue to develop and improve. Here are the key features:
Automatic Memory Type Management
You won't have to figure out which memory modules need to be registered for your entity - the library does this automatically.
Dynamic Sensors
Sensors can now be configured and managed dynamically. This opens up possibilities for creating more flexible and advanced sensors.
Advanced Behaviors
Use built-in or create new behaviors based on an extensible behavior class that includes callbacks, predictions, cooldowns, and much more.
Runtime-Safe Behavior Modification
Dynamically add, remove, and modify behaviors in existing entities without risking stability.
Optimization
SBL replaces almost all functions of the standard brain system, using highly efficient methods to eliminate inefficiency in all possible areas. When properly configured, an entity with SBL can perform even more efficiently than with the goals system!
Additional Sensors, Behaviors, and Memory Types
The library includes additional modules that can be used with any entities, and their number will grow over time.
Utility Functions
In addition to the main brain functionality, SBL adds additional tools such as:
- Optimized functions for getting entities at the level
- Convenient Random library for developers
- Brain interface utilities for adding/removing brain content from entities without SBL
How to Use the Library?
Complete documentation is available on the Wiki page
If you encounter issues or want to contribute, visit the Github page and share your ideas