一个用于 Minecraft 的大脑库,使大脑系统更易于使用和管理。
注意:这是一个模组库。除非您是使用它的开发者,否则它本身不会执行任何操作。
这是什么?
Minecraft 中的大脑系统是 Mojang 引入的一种近乎晦涩的新实体 AI 系统,旨在处理更复杂的生物,并允许进行更高级的实体处理。
不幸的是,Mojang 的实现存在不足且过于复杂。
此外,其实现方式相当低效,这意味着总体而言,该系统不值得用来替代现有的目标系统。
本库旨在彻底改造大脑系统,使其真正可用且可配置。
需要注意的是,现有的目标系统在表面上仍然更简单——大脑系统旨在处理更复杂的交互,但尝试使用它也很有趣。
那么 SmartBrainLib 能做什么?
SBL 对大脑系统采取了多维度的方法,并且随着我的使用,它将不断扩展和改进。
以下是其主要功能:
自动处理内存类型
无需再操心为实体注册哪些内存模块。
动态传感器
传感器现在可以动态配置和处理。这使得构建更高级、更灵活的传感器成为可能。
高级行为
使用内置的行为,或基于可扩展的行为类创建新行为,该类内置了回调、谓词、冷却时间等功能。
运行时安全的行为修改
可从现有实体中动态添加、移除和修改行为。
优化
SBL 几乎替换了原版大脑系统的所有功能,使用高效函数尽可能消除大脑在诸多方面的低效问题。正确使用后,SBL 实体的效率甚至可能高于使用目标点的实体!
额外的传感器、行为和内存类型
SBL 内置了可供任何实体使用的额外模块,未来还将持续增加更多。
如何使用它?
该库的文档位于其 Wiki 页面:
如果您遇到问题或希望做出贡献,请前往 GitHub 页面并发表您的意见
A brain library for Minecraft, making the brain system easier to use and manage.
NOTE: This is a mod library. It does not do anything on its own unless you are a developer utilising it.
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.
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
评论 0
登录后参与评分
还没有评论,来抢沙发吧