TFMG Converter 修复补丁
针对 Create: The Factory Must Grow (TFMG) 的非官方兼容性补丁,旨在修复所有当前 TFMG 分支、TFMG 1.2.0、TFMG 1.2.2+ 以及 TFMG Community Edition 中的 Converter(转换器) 方块问题,并在那些不再提供可用 Converter 的版本中添加其自有的 Converter 方块。
问题描述
在 TFMG 1.2.0 中,Converter 方块(用于将存储的 FE 转换为 TFMG 自身的电力系统)可能会永久卡住并显示以下信息:
U = 0V
I = 0A
Network Power Generation: P = 0W
……即使能量缓冲区已满且存在有效连接的电路网络。无论存储了多少 FE,也无论网络的电阻/负载如何布线,此现象都会发生。
此外,TFMG 1.2.2 及更高版本完全移除了 Converter 方块(类文件仍隐藏在 jar 包内,但并未注册),这意味着使用现代 TFMG 版本的玩家根本无法将其他模组(如 Create: Crafts & Additions 等)的 FE 桥接至 TFMG 自身的电力网络中。
根本原因(1.2.0)
深入调查 TFMG 1.2.0 的电路网络代码后发现,0W 故障是一个时序 bug:当电路网络更新时,它会检查网络电阻以决定 Converter 是否被允许生成电压,但电阻计算被安排在了依赖它的检查之后运行。当电阻实际被计算出来时,电压生成检查已经运行完毕并锁定了“0 输出”状态,此后没有任何东西触发新的检查。因此,尽管网络本身完全正常,Converter 却会无限期地报告零输出。
本模组修复内容
针对 TFMG 1.2.0:
- 电阻时序修复: 现在 Converter 检查电阻之前会重新计算网络电阻,而不是延迟一个 tick(或更久)。这是核心修复,它使电压/电流得以恢复正常流动。
- 合理的默认模式: Converter 放置时默认为输出模式,而不再是生成在输入模式并需要先用扳手点击切换。
- 全方向线缆连接: Converter 现在可以从任意一侧接受电缆连接,而不再受限于方块朝向所决定的单一固定侧面。
针对 TFMG 1.2.2+ 和 Community Edition:
- 由于这两个版本均不再自带可用的 Converter,本模组注册了其自有的 Converter 方块,该方块已完全移植到这些版本所使用的更新版电路 API 中,支持 1:1 的 FE 转换,默认为输出模式,且开箱即用支持从任意侧接入线缆。
- 这两个版本已在原生层面修复了电阻时序 bug,因此本模组会自动检测到此情况并跳过重新应用该修复,仅介入提供缺失的方块。
自动检测,无需配置: 本模组通过读取类字节码(而非加载 TFMG 自身的类)来识别加载的是哪个 TFMG 变体,从而为你的环境精确应用正确的行为,无需任何配置。这也意味着它将自动避免干扰任何未来发布自有修复方案或自有 Converter 的 TFMG 构建(无论是官方还是分支)。
以上内容不改变 TFMG 的合成配方、平衡性或内容,这纯粹是一项功能性和兼容性修复,确保 Converter 在你运行的任何 TFMG 版本中都能按预期工作。
需求
这是一个补丁/兼容层,你仍然需要安装 Create: The Factory Must Grow(任意 1.2.0、1.2.2+ 或 Community Edition 版本均可)。本模组在此基础上补充缺失的行为,单独运行时无效。
来源与兼容性
本模组最初是为了解决在开发 [Cobblemon + Create - Pokémon meets Industrial Revolution!](我的整合包,结合了 Cobblemon 和 Create,包含 300+ 个模组)时发现的一个 Bug 而制作的。不过,这是一个针对 TFMG 本身的通用修复,不具有整合包特异性,适用于任何包含 TFMG 的整合包或独立设置,基于 NeoForge 1.21.1。
致谢
Create: The Factory Must Grow 本身的荣誉归功于其原作者 DrMangoTea。本模组是非官方的社区制作补丁,与 TFMG 开发者无关,也未得到其认可。
许可证 / 使用方式
你可以自由使用本模组及其源代码,无论是用于整合包、分支、衍生补丁或其他用途。无需征得许可。
TFMG Converter Fix
An unofficial compatibility patch for Create: The Factory Must Grow (TFMG) that fixes the Converter block across every current TFMG branch, TFMG 1.2.0, TFMG 1.2.2+, and TFMG Community Edition, and adds its own Converter block on the versions that no longer ship a usable one.
The Problem
On TFMG 1.2.0, the Converter block (which converts stored FE into TFMG's own electrical system) could get stuck permanently showing:
U = 0V
I = 0A
Network Power Generation: P = 0W
…even with a full energy buffer and a valid, connected electrical network. This happened regardless of how much FE was stored or how the network's resistors/consumers were wired.
On top of that, TFMG 1.2.2 and later removed the Converter block entirely (the classes are still buried in the jar, but nothing registers them), so anyone on a modern TFMG version had no way to bridge FE from other mods (Create: Crafts & Additions, etc.) into TFMG's own electrical network at all.
The Root Cause (1.2.0)
Digging through TFMG 1.2.0's electrical network code, the 0W bug turned out to be a timing bug: when the electrical network updates, it checks the network's resistance to decide whether the Converter is allowed to generate voltage, but the resistance calculation was scheduled to run later than the check that depends on it. By the time the resistance was actually calculated, the voltage-generation check had already run and locked in "0 output" for that pass, and nothing ever triggered a fresh check afterward. The Converter was stuck reporting zero output indefinitely, even though the network itself was perfectly valid.
What This Mod Fixes
On TFMG 1.2.0:
- Resistance timing fix: the network's resistance is now recalculated before the Converter checks it, instead of a tick (or more) too late. This is the core fix, it's what actually gets voltage/current flowing again
- Sensible default mode: the Converter now defaults to output mode when placed, instead of spawning in input mode and requiring a wrench tap first
- Omnidirectional cable connection: the Converter now accepts an electrical cable connection from any side, instead of only one fixed side determined by which way the block is facing
On TFMG 1.2.2+ and Community Edition:
- Since neither version ships a working Converter anymore, this mod registers its own Converter block, fully ported to the updated electrical API these versions use, with a 1:1 FE conversion, defaulting to output mode, and accepting cables from any side out of the box
- Both versions already fix the resistance-timing bug natively, so this mod automatically detects that and skips reapplying it, it only steps in to provide the missing block
Automatic detection, zero configuration: the mod identifies which TFMG variant is loaded by reading class bytecode (never by loading TFMG's own classes), so it applies exactly the right behavior for your setup with nothing to configure. This also means it will automatically stay out of the way of any future TFMG build, official or a fork, that ships its own fix or its own Converter.
None of this changes TFMG's recipes, balance, or content, it's purely a functional and compatibility fix so the Converter behaves the way it's supposed to, on whichever TFMG version you're running.
Requirements
This is a patch/compatibility layer, you still need to have Create: The Factory Must Grow installed (any of 1.2.0, 1.2.2+, or Community Edition). This mod adds the missing behavior on top of it and does nothing on its own.
Origin & Compatibility
This mod was originally built to fix a bug found while developing [Cobblemon + Create - Pokémon meets Industrial Revolution!], my own modpack combining Cobblemon and Create with 300+ mods. That said, it's a general-purpose fix for TFMG itself, there's nothing pack-specific about it, and it should work fine in any modpack or standalone setup that includes TFMG, on NeoForge 1.21.1.
Credits
All credit for Create: The Factory Must Grow itself goes to its original author, DrMangoTea. This mod is an unofficial, community-made patch and is not affiliated with or endorsed by the TFMG developer.
License / Usage
You're free to use this mod, and its source code, however you like, in modpacks, forks, derivative patches, or anything else. No permission needed.
评论 0
登录后参与评分
还没有评论,来抢沙发吧