SmartBrainLib (Forge/Fabric/Quilt)

SmartBrainLib (Forge/Fabric/Quilt)

13M Downloads

A brain library for Minecraft, making the brain system easier to use and manage.

What is this?

The brain system in Minecraft is an almost cryptic new entity AI system that Mojang introduced to handle more complex mobs, and allow for more advanced entity handling.

Unfortunately Mojang's implementation is lacking, and overly complex.

Additionally, it's also done in a rather inefficient way, which means that overall the system is not worth using in place of the existing goals system.

This library aims to overhaul the brain system, making it actually usable, and configurable.

Note however, that the existing goal system will still be simpler at face value - the brain system is intended for more complex interactions, but it can also be fun to experiment with.

So what does SmartBrainLib do?

SBL is a multi-facet approach to the brain system, and will continue to expand and improve as I use it.

Here are its main features:

 Auto-handles memory types

Don't worry about having to work out which memory modules to register for your entity.

 Dynamic sensors

Sensors can now be dynamically configured and handled. This allows for much more advanced and flexible sensors

 Advanced behaviours

Utilise built-in, or create new behaviours based on an extensible behaviour class, which builds in callbacks, predication, cooldowns, and more.

 Runtime-safe behaviour modification

Add, remove, and modify behaviours dynamically from an existing entity.

 Optimisation

SBL replaces almost the entirety of the vanilla brain system's functions, using high-efficiency functions to remove the inefficiencies in as many areas as possible of the brain. Done right, an SBL entity could be even more efficient than one using goals!

 Additional sensors, behaviours, and memory types

SBL builds in additional modules for use in any entity, with more to come over time.

To-Do:

SBL is still in early-days, and I'll continue improving and adding to it where I can. But for the time being, there's some things to do:

  • Improve the CurseForge page (lol, I'm not good at this)
  • Add more behaviours
  • Add more memory modules
  • Add more sensors

How do I use it?

The library is documented on its wiki page: https://github.com/Tslat/SmartBrainLib/wiki

If you have issues or want to contribute, please jump on the GitHub page and make your voice heard