FoamFix 是一款模组,旨在通过简单、有针对性的优化来改善模组化 Minecraft 体验中的某些方面。
功能特性
FoamFix 特别专注于模组化 Minecraft 的以下方面:
- 内存使用(Minecraft 1.8+)。这是制作 FoamFix 的初衷,也是其如今被整合包广泛采用的最重要原因。观察表明,在特别沉重的整合包中,Java 堆内存使用量(以主菜单加载完成后使用 VisualVM 测量)最多可减少 50%!
- TPS 使用,特别是在大型服务器上——幽灵区块加载和网络改进对单人游戏体验帮助不大,但在扩展多人世界时可能带来极大的益处。
还有一些更次要的优化,但它们可能不会对你的游戏玩法产生直接影响。请查看 foamfix.cfg 文件获取完整列表!

常见问题解答 (FAQ)
- 问: 我遇到了性能问题,移除 FoamFix 后问题就解决了!
- 答: 请确保你已更新到最新版本。由于我的资源有限,我无法测试成千上万种计算机硬件配置下的 FoamFix,有时会出现特定于某些配置的 Issues。如果你已更新到最新版本但仍遇到问题,请联系我!
- 问: 如果客户端/服务器端没有安装 FoamFix,我可以在服务器/客户端侧运行它吗?
- 答: 可以。
- 问: 我可以在服务器和客户端之间混合使用不同版本的 FoamFix 吗?
- 答: 同样可以。
- 问: 为什么还有针对 1.7.10 的 FoamFix?
- 答: FoamFix 主要面向 1.8+ 的模组化 Minecraft。然而,其后期的一些优化——特别是幽灵区块加载修复——结合一些已被废弃的 Bug 修复/优化项目(BugfixMod、Minecraft Forkage),促使我为 1.7.10 创建了一个同名优化模组,该模组共享部分功能。一如既往,请查看
foamfix.cfg了解更多! - 问: 你能为原版 Minecraft 制作一个 FoamFix 吗?
- 答: FoamFix 几乎全部专注于模组环境特有的优化。将其移植到原版带来的收益非常有限,因为原版本身甚至比 Forge+FoamFix 更高效。如果你运行的是大型原版服务器,使用专门的解决方案可能是更好的选择。
- 问: 你可以在开发环境中运行 FoamFix 吗?
- 答: 可以,但你必须使用 BON2 或类似工具手动进行去混淆处理。
Bug 报告
请尝试在没有安装 FoamFix 的情况下复现 Bug —— 如果未安装 FoamFix 时问题依然存在,那么这很可能不是 FoamFix 的问题。
当你报告仅在安装 FoamFix 后出现的 Bug 时,
- 请务必仅在此处报告! 这有助于我追踪现有问题。
- 特别地,请不要向其他模组开发者报告!如果我得出结论认为该问题是由其他模组引起的,我会尽力亲自联系该作者并与其讨论修复方案;然而,不必要的 Bug 报告有点令人烦恼。
额外提示
(注意:此部分将在某个时候重写为更全面的优化指南)
- 在
forge.cfg中启用alwaysSetupTerrainOffThread。(从 0.6.3 版本开始,FoamFix 会自动为新实例执行此操作!) - 如果你遇到与“幽灵区块加载”相关的卡顿(每 ~30 秒出现一次明显的延迟峰值),一种缓解问题的方法是增加
forgeChunkLoading.cfg中dormantChunkCacheSize的值。 - 对于某些 GPU/驱动配置(特别是某些 AMD 驱动/显卡组合),禁用多级渐远纹理(将 Mipmap Levels 设置为 0)将显著提升 FPS。这是由于随着需要更新的纹理数量增加,由动画纹理更新引起的延迟会线性增长。
- 在专用服务器上,设置
max-tick-time=0可以解决与 “java.lang.Error: Watching server” 相关的崩溃。仍在调查导致此问题的原因!
常见崩溃
java.lang.NoSuchMethodError: net.minecraftforge.common.model.TRSRTransformation.isIdentity()Zon FoamFix 0.9.6+ - 将 Forge 更新到最新的推荐版本,或将 FoamFix 降级到 0.9.5。java.lang.IllegalArgumentException: Cannot set property [...], it is not an allowed value- 导致此错误的代码路径非常接近原版行为,并且应该在没有 FoamFix 的情况下导致相同的崩溃。请确保在没有 FoamFix 时无法复现该问题。- 如果你将 SpongeForge 与 FoamFix 一起使用(请注意我不支持它),可以通过在
config/foamfix.cfg中禁用coremod.optimizedBlockPos来修复与 MixinMutableBlockPos 相关的常见崩溃。
支持
- 请仅使用 GitHub Issue 跟踪器进行 Bug 报告。这样更容易追踪它们。
- 请注意,“不支持”并不意味着“完全无法工作”,而是意味着“事情可能会出错,而我可能因各种原因无法帮助你”。请小心!
以下模组不受支持,我也无法保证与它们的交互相关的问题能得到令人满意的修复:
- FastCraft 2。许可协议非常严格,如果不依赖开发者作为“神谕”,则无法调试。
- NotEnoughIDs。自 2017 年 9 月起不再维护。
- OptiFine。许可协议非常严格,如果不依赖开发者作为“神谕”,则无法调试。
- Sponge。我们的引擎更改存在冲突。(注意,即使你在服务器端使用了 Sponge,在连接至 Sponge 服务器时在客户端侧使用 FoamFix 是受支持的!)
- TexFix。
- 大多数其他专有优化模组。如果我看不到源代码,我可能不会致力于修复它们。
FoamFix is a mod designed to optimize certain aspects of a modded Minecraft experience using simple, targeted optimizations.
Features
FoamFix focuses on the following aspects of modded Minecraft in particular:
- Memory usage (in Minecraft 1.8+). This is the original reason FoamFix was made for, and the most important reason for it being adopted in modpacks today. Observations show that, on particularly heavy modpacks, Java heap usage (as measured on the main menu, after the game has finished loading, with VisualVM) can fall by as much as 50%!
- TPS usage, particularly on larger servers - ghost chunk-loading and network improvements will not help the single-player experience much, but can be incredibly beneficial when trying to scale up a multiplayer world.
There are also other, more minor optimizations, but they will probably not have a significant impact on your gameplay directly. Check your foamfix.cfg file for a complete list!

FAQ
- Q: I'm having performance issues, and removing FoamFix fixes them!
- A: Make sure you have updated to the latest version. It is impossible for me to test FoamFix on the thousands of computer hardware configurations out there with my own resources, and sometimes issues specific to some of them can occur. If you have updated to the latest version and are still experiencing issues, contact me!
- Q: Can I run FoamFix on the server/client side if it's not present on the client/server side?
- A: Yes.
- Q: Can I mix versions of FoamFix between the server and client side?
- A: Similarly, yes.
- Q: Why is there a FoamFix to 1.7.10?
- A: FoamFix primarily targets 1.8+ modded Minecraft. However, some of its later optimizations - particularly ghost chunkloading fixes - in combination with some abandoned bugfixing/optimization projects (BugfixMod, Minecraft Forkage) have led me to create an optimization mod under the same name for 1.7.10, which shares some of the functionality. As always, check foamfix.cfg to learn more!
- Q: Can you make a FoamFix for vanilla?
- A: Almost all of FoamFix focuses on optimizations particular to modded environments. Porting it to vanilla would have very few benefits, as vanilla by itself is more efficient than even Forge+FoamFix. If you're running a large vanilla server, it might be a better idea to use a dedicated solution for that.
- Q: Can you run FoamFix in a development environment?
- A: Yes, but you must manually deobfuscate it with BON2 or a similar tool.
Bug Reporting
Please try to reproduce the bug without FoamFix first - if it is still present without FoamFix, it is most likely not a FoamFix issue.
When you report a bug that only appears with FoamFix installed,
- Please ONLY report them here! This helps me keep track of existing issues.
- In particular, please do not report them to the other mod developers! If I get to the conclusion that the issue is caused by a different mod, I'll do my best to contact the other author myself and discuss the fix with them; however, unnecessary bug reports are a bit of a nuisance.
Additional Tips
(Note that this section will be rewritten as a more comprehensive optimization guide at some point)
- Enable alwaysSetupTerrainOffThread in forge.cfg. (Since 0.6.3, FoamFix will automatically do this for you on new instances!)
- If you're experiencing "ghost chunk loading"-related lag (a noticeable lag spike every ~30 seconds), a way to partially work around the problem is to increase the value of dormantChunkCacheSize in forgeChunkLoading.cfg.
- For some GPU/driver configurations (in particular, certain AMD driver/card pairs), disabling mipmaps (setting Mipmap Levels to 0) will boost FPS considerably. This is due to lag caused by animated texture updates being much higher with increasing amounts of textures to update, which scales linearly with the amount of mipmap levels.
- On dedicated servers, setting max-tick-time=0 can solve crashes related to "java.lang.Error: Watching server". Still looking into why this happens!
Common Crashes
- java.lang.NoSuchMethodError: net.minecraftforge.common.model.TRSRTransformation.isIdentity()Z on FoamFix 0.9.6+ - Update Forge to the latest recommended version, or downgrade FoamFix to 0.9.5.
- java.lang.IllegalArgumentException: Cannot set property [...], it is not an allowed value - The codepath causing this error mimics vanilla behaviour very closely, and should cause the same crash without FoamFix. Make sure it cannot be reproduced without FoamFix.
- If you're using SpongeForge alongside FoamFix (keep in mind that I do not support it), a common crash related to MixinMutableBlockPos can be fixed by disabling coremod.optimizedBlockPos in config/foamfix.cfg.
Support
- Please only use the GitHub issue tracker for bug reports. Makes it easier to keep track of them.
- Please note that "not supported" does not mean "won't work at all" - rather, it means "things can break and I might be unable to help you for various reasons". Be careful!
The following mods are not supported and I cannot guarantee satisfactory fixes related to interactions with them:
- FastCraft 2. The licensing is very strict and debugging impossible without relying on the developer as an oracle.
- NotEnoughIDs. Not maintained since September 2017.
- OptiFine. The licensing is very strict and debugging impossible without relying on the developer as an oracle.
- Sponge. Some of our engine changes conflict. (Note that, even if you have Sponge on the server side, using FoamFix on the client side while connecting to a Sponge server is supported!)
- TexFix.
- most other proprietary optimization mods. If I can't see the source code, I'm not likely to work on fixing it.
下载 FoamFix
下载 FoamFix
下载 FoamFix
下载 FoamFix
下载 FoamFix
下载 FoamFix
下载 FoamFix
下载 FoamFix
下载 FoamFix
下载 FoamFix
添加缺失的 mcmod.info 文件。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
评论 0
登录后参与评分
还没有评论,来抢沙发吧