Minecraft 的大脑库,让大脑系统的使用和管理变得更加简单。
这是什么?
Minecraft 中的大脑系统是一个近乎晦涩的新实体 AI 系统,Mojang 引入该系统以处理更复杂的生物,并允许进行更高级的实体控制。
不幸的是,Mojang 的实现存在不足且过于复杂。
此外,其实现方式相当低效,这意味着总体而言,用此系统替代现有的目标系统并不值得。
本库旨在彻底改造大脑系统,使其真正可用且可配置。
需要注意的是,就表面而言,现有的目标系统仍然更简单——大脑系统旨在用于更复杂的交互,但尝试使用它也会很有趣。
那么 SmartBrainLib 能做什么?
SBL 采用多维度方法对待大脑系统,并会随着我的使用而不断扩展和改进。
以下是其主要功能:
自动处理记忆类型
无需担心需要计算哪些记忆模块应注册到您的实体中。
动态传感器
传感器现在可以动态配置和处理。这允许创建更高级和灵活的传感器。
高级行为
利用内置行为,或基于可扩展的行为类创建新行为,该类内置回调、预测、冷却时间等功能。
运行时安全的行为修改
从现有实体中动态添加、移除和修改行为。
优化
SBL 几乎完全替换了原版大脑系统的函数,使用高效率函数尽可能消除大脑系统中各个区域的不效率。如果操作得当,使用 SBL 的实体甚至可能比使用目标的实体更高效!
额外的传感器、行为和记忆类型
SBL 内置了可用于任何实体的额外模块,未来还将持续增加。
新增实用函数
除了预期的脑功能外,SBL 还额外添加了辅助工具,例如:
- 优化的层级实体获取函数
- 对开发者友好的随机库
- 用于从非 SBL 实体中添加/移除脑内容的脑接口工具
如何使用它?
该库的文档位于其 Wiki 页面
如果您遇到问题或希望贡献代码,请前往 Github 页面 并提出您的意见
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
评论 0
登录后参与评分
还没有评论,来抢沙发吧