
这是一个用于 FTB Quests 的简易修复模组,它会在启动时缓存任务菜单,以防止游戏内出现卡顿。该模组已在诸如 Prominence II RPG 等整合包中经过测试,能够有效避免首次打开任务书时出现的约 10 秒延迟峰值。
工作原理是什么?
FTB Quests 需要初始化 Minecraft 创造模式下的文本搜索提供程序。在生存模式的 Minecraft 中,这一过程默认不会执行,因为通常情况下它不会被用到。该过程涉及遍历游戏中的所有物品,获取其全部工具提示内容,并对它们进行处理。在包含大量物品和任务的整合包中,随着添加更多为物品增加文本内容的模组,这一过程的计算量会呈指数级增长。
此模组无法从根本上解决这一问题,因为将这些数据全部缓存下来对于确保功能正常运行至关重要。然而,它可以做的是在用户仍处于加载界面时进行缓存,这样当玩家进入游戏后,就不会再出现随机的卡顿现象。这会增加几秒的加载时间(具体取决于原本卡顿的时长),但能有效避免在游戏过程中因随机卡顿带来的困扰。

This is a simple fix mod for FTB Quests that caches the Quests menu on startup to prevent freezing in game. Tested in packs such as Prominence II RPG, where it prevents a 10 second lag spike when opening the quest book for the first time.
How does this work?
FTB Quests needs to initialize Minecraft's Creative mode text search provider, which is not done by default in survival Minecraft since it's never used. This involves looping over every item in the game, fetching all of the tooltip contents, and processing them all. In large modpacks, with lots of items and quests, this scales up exponentially with more mods that add more text to items.
This mod can't fix that, as it's actually important that all of that gets cached so that things work properly. But, what it can do is cache it on startup while the user is still in a loading screen, so that once they're in game, there won't be any random freezing. This adds a couple seconds to loading times (depending on how long the freeze would have been) but saves the headache of having the game randomly freeze during gameplay.
评论 0
登录后参与评分
还没有评论,来抢沙发吧