注意 1: 如果您遇到未涵盖的性能问题,欢迎提交请求。 注意 2: 本模组并不保证在所有情况下都能提升性能。请务必测试您的实际效果,以判断您是否需要它。
简介
这是一款专注于性能和游戏内 AI 底层修改的简化 AI 修改模组。旨在弥补原版游戏的不足,并为整合包生态提供更好的支持。处理常见问题,如动物过多、僵尸群导致的性能下降,以及大型 AI 优化模组会跳过的一些简单任务移除。
背景故事
AI Improvements 诞生于改善大型重度整合服服务器性能的需求。任何有经验的服务器管理员都知道,服务器的 CPU 时钟时间会被各种争抢资源的模组消耗殆尽。大多数服务器管理员和开发者会试图通过精简模组来解决这个问题。但我没有去针对已安装的模组,而是开始审视 Minecraft 本身,关注其设计原理以及如何导致性能问题。
我发现随着服务器玩家数量的增长,实体和其他资源的数量也随之增加。起初,我想“让我们降低服务器中生物的生成率”,但这导致了关于刷怪塔的投诉。即使经过测试,这也没有显示出对问题的重大解决方案。因此,我决定改进 AI 的工作方式。这需要对不同领域进行大量的资源投入和研究。经过许多小时的努力,我找到了解决方案并创建了此模组。
常见问题解答
我安装了但没有看到承诺的巨大收益?
较新版本的 MC 已经实施了 AI 修复。在最近几个版本中,除了其他修复外,还实现了旋转修复。因此,本模组在旧版本中的影响要小得多。
可以仅安装在服务器上吗?
可以,该模组编码为无需客户端即可运行。
可以仅安装在客户端上吗?
可以,虽然它对提升 FPS 可能不会有太大帮助。
配置文件在哪里?
.minecraft/config/bbm/AI_Improvements.cfg
如果我禁用 EntityLookHelper 替换会发生什么?
您将不会在 AI 代码中看到明显的改进。但是,如果您启用了其他禁用配置,应该没问题。
本模组如何修复性能?
这取决于特性和 Minecraft 的版本。大部分性能提升来自于缓存大量计算的值。这会导致 CPU 时间的减少,代价是可以忽略不计的 RAM 占用。具体细节请参阅特性列表...
当前特性:
禁用 AI 注视最近实体的配置
默认情况下,配置设置为 false,不会执行任何操作。当更改为 true 时,它将移除一个名为 EntityAIWatchClosest 的 AI 段。该 AI 段处理用于让实体头部转向附近实体的编码 AI。视觉上可能会导致一些奇怪的问题。然而,对于 CPU 来说,这会释放由实体引起的大量使用量。
禁用 AI 随机注视的配置,默认未启用
默认情况下,配置设置为 false,不会执行任何操作。将配置设置为 true 将导致实体不再使用“空闲注视”AI 代码。这对于拥有大量人口的游戏服务器可以提高性能。因为地图上几乎所有实体在不执行重要任务时都会使用此代码。视觉上可能会导致实体头部有时不旋转,但大多时候不易察觉。
用更高效的版本替换 EntityLookHelper,配置默认启用
这是模组的主要功能,可以在少量 RAM 成本的情况下大幅提高 CPU 性能。其工作原理是用自定义版本替换 MC 的注视辅助器代码。自定义版本存储了一些数据,使其能更快地获取位置的角度。通过 VisualVM 进行的测试结果显示,AI 代码的 CPU 使用率降低了 50% 到 80%。对于一个始终有 25 人在线的服务器,这带来了从 5 tps 到 7 tps 的提升。
Note 1: If you have performance issues not covered feel free to make a request.
Note 2: It is not expected this mod improves performance in all cases. Make sure to test your results to see if you require it.
About
Simplified AI modification mod focused on performance and low-level modifications to AIs in the game. Picking up the slack for the base game and improving it for a modded ecosystem. Handling common problems such as too many animals, performance hits from swarms of zombies, and simple remove tasks skipped by larger AI improvement mods.
Story
AI Improvements was born out of the need to improve server performance for large heavily modded servers. As any experienced server owner will know a server's CPU clock time is eaten away by mods all trying to fight over resources. Most server owners and developers will try to attack this problem by trimming mods. Rather than going after the mods installed I started to look at Minecraft itself. Focusing down on how it was designed to work and how it lent to performance problems.
I found that as a server's population grows so does the amount of entities and other resources. At first, I thought "lets reduce the spawn rate of mobs on the server" this lead to a complaint about mob farming. Even with testing, it didn't show a major solution to the problem. So rather than taking that approach, I decided to improve how the AI's function. This resulted in a lot of resource and insight into different areas. After many hours, I found my solution and created this mod.
FAQ
I installed but didn't see a large gain as promised?
Newer versions of MC implement fixes for the AI. With the last few versions, the rotation fix was implemented in addition to other fixes. Thus, the impact of this mod is much lower than in older versions.
Can this be installed on the server only?
Yes, the mod is coded to function without it being client side
Can this be installed on the client only?
Yes, though it may not do much to improve fps.
Where is the config?
.minecraft/config/bbm/AI_Improvements.cfg
What will happen if I disable the EntityLookHelper replacement?
You're not going to see much of an improvement in the AI code. However, if you enabled the other disable configs it should be fine.
How does this mod work for fixing performance?
It depends on the feature and version of Minecraft. Most of the performance comes from caching heavily calculated values. This has the result of reducing CPU time at the cost of an ignorable amount of RAM. See feature list for exacts...
Current Features:
Config to disable AI Watch Closest Entity
By default the config is set to false and will not do anything. When changed to true it will remove an AI segment called EntityAIWatchClosest. This AI segment handles the coded AIs use to rotate their head towards a nearby entity.Visually this will cause a few odd issues. However, for the CPU this frees up a lot of usage caused by entities.
Config to disable AI look random, config is not enabled by default
By default the config is set to false and will not do anything. Setting the config to true will cause entities to no longer use the 'look idle' AI code. This can improve performance for servers will large populations. As almost every entity on the map will use this when not doing anything important. Visually this can cause the entities head to not rotate sometimes but mostly goes unnoticed.
Config to replace EntityLookHelper with a more efficient version, config is enabled by default
This is the main feature of the mod and can greatly improve CPU performance at a small cost to RAM. How this works is MC's look helper code is replaced with a custom version. The custom version stores some data that makes it faster to get the angle for a location. Threw some testing with VisualVM result have shown a 50% to 80% decrease in CPU usage by the AI code. For a server with 25 people on constantly this resulted in a gain from 5 to 7 tps.
下载 AI Improvements: Performance Tuning
下载 AI Improvements: Performance Tuning
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AI Improvements: Performance Tuning
下载 AI Improvements: Performance Tuning
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AI Improvements: Performance Tuning
下载 AI Improvements: Performance Tuning
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AI Improvements: Performance Tuning
下载 AI Improvements: Performance Tuning
下载 AI Improvements: Performance Tuning
下载 AI Improvements: Performance Tuning
修复与 NeoForge 26.3.0.37-beta 的兼容性问题。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
评论 0
登录后参与评分
还没有评论,来抢沙发吧