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
下载 SmartBrainLib
下载 SmartBrainLib
下载 SmartBrainLib
下载 SmartBrainLib
下载 SmartBrainLib
下载 SmartBrainLib
下载 SmartBrainLib
下载 SmartBrainLib
下载 SmartBrainLib
下载 SmartBrainLib
更新日志
版本
2.0.3
变更
- 添加随机传感器偏移量,以模拟原版处理逻辑并增加一些随机性
- 修复
getTimeUntilMemoryExpires的 Javadoc - 同步
COMPUTED_MEMORIES映射表以防止跨线程污染 - 修复 ExtendedSensors 延迟一个刻(tick)进行更新的问题
- 推迟自定义行为处理,并确保重写的方法正确重新应用其条件,适用于:
ExtendedBehaviourConditionlessAttackConditionlessHeldAttackCustomBehaviourCustomDelayedBehaviourCustomHeldBehaviour
- 修复
BrainUtil#setTargetOfEntity错误比较之前目标的问题 - 修复
EntityRetrievalUtil仅通过半径检索实体时只搜索了一半半径的问题 - 修复活动中断/移除未检查行为是否已启动就停止它们的问题
- 在创建时传递 packedBrain——尽管你不应该依赖它来存储记忆
- 修复
BrainUtil#getAllBehaviours无效的问题 - 修复 TransformingListView 实现不完全正确的问题
- 修复计划活动每刻都替换自身的问题
- 扩展
EasyRandom的表面放置逻辑 - 调整
FollowEntity的传送逻辑 - 修复
MoveToWalkTarget处理不当的问题 - 修复
EscapeSun的隐藏谓词损坏的问题 - 修复
FollowEntity未能正确重置寻路惩罚的问题 - 修复
BreakBlock未持续更新其缓存方块的问题 - 扩展
LookAtTarget的谓词条件 - 修复
DelayedBehaviour有时阻止自身运行的问题 - 修复
StrafeTarget/StayWithinDistanceOfAttackTarget计算距离过近不正确的问题 - 改善
BreedWithPartner的距离匹配 - 防止
SequentialBehaviour#runningBehaviour被停止两次 - 防止当没有
TEMPT_RANGE的生物使用ItemTemptingSensor时默认实现崩溃 - 修复
NearbyHostileSensor使用了错误的参数 - 修复
LeapAtTarget损坏的攻击逻辑 - 修复
BreezeSpecificSensor未实际使用其谓词的问题 - 修复
PiglinSpecificSensor未填充NEARBY_ADULT_PIGLINS记忆的问题 - 修复
AxolotlSpecificSensor使用了错误的半径 - 修复
ConditionlessAttack执行了两次所有操作的问题 - 调整
NearestVisibleEntityFilteredSensor的实现以消除重叠并简化其用法 - 移除
NearbyAdultSensor对AgeableMob的隐式要求
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
评论 0
登录后参与评分
还没有评论,来抢沙发吧