SmartBrainLib

SmartBrainLib

Mod

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

Server Library MobsUtility

194.6k downloads
89 followers
Createda year ago
Updated17 hours ago

Follow Save
Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.

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.

Added utility functions

As well as the expected brain functionality, SBL additionally adds additional helpers, such as:

  • Optimised level entity-getter functions
  • Developer-friendly Random library
  • Brain interface utility for adding/removing brain content from non-SBL entities

How do I use it?

The library is documented on its Wiki Page




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

External resources



Project members

Tslat

Owner


Technical information

License
MPL-2.0
Client side
unsupported
Server side
required
Project ID