
TFMG Converter Fix
Unofficial compatibility patch for Create: The Factory Must Grow (TFMG). Fixes the Converter's zero voltage/current bug on TFMG 1.2.0, and adds a working Converter block on TFMG 1.2.2+/Community Edition, where it was removed. Requires TFMG.
2.0.0
Compatibility
Changes
2.0.0 β Universal Compatibility (TFMG 1.2.0 / 1.2.2+ / Community Edition)
This release makes the mod work correctly across every current TFMG branch, not just the version it was originally built for.
β Added
- A dedicated Converter block for TFMG 1.2.2+ and TFMG Community Edition. Neither of these versions ships a usable Converter anymore (the classes are still present in the 1.2.2 jar, but nothing registers them), so this mod now provides its own
tfmgelectricalfix:converterblock, item, block entity, and FE capability, letting power flow between TFMG and other FE-based mods (like Create: Crafts & Additions) on these versions too - The new Converter is fully ported to the updated electrical API used by 1.2.2+/CE (power, usage, and resistance are now handled as floats instead of integers), with a 1:1 FE conversion, a 500,000 FE capacity, and a 10,000 FE/t transfer rate, and correctly defaults to output mode on placement
- Automatic TFMG version detection, entirely by reading class bytecode rather than loading TFMG's own classes, so the mod knows whether it's running on 1.2.0, 1.2.2+, or Community Edition, and behaves accordingly, with zero configuration needed
- A capability check that detects whether the loaded TFMG version already has its own fix for the resistance-timing bug (see 1.0.0 below), so the mod automatically stops applying that fix wherever it's no longer needed, including on any future TFMG build, official or a fork, that ships the same fix. No code changes will be required for that to keep working
- A startup log line reporting which TFMG variant was detected
π Changed
- The original 1.0.0 fixes (see below) now apply only on TFMG 1.2.0, the only version that still has the underlying bug. On 1.2.2+ and Community Edition, none of the original patches are applied since they're either unnecessary or superseded by the new dedicated Converter block
π Fixed
- A startup crash caused by the mod's version-detection logic accidentally loading TFMG's block entity classes too early, before Flywheel's own patches to those classes were ready. Detection is now done by reading class bytecode directly instead of loading the classes
- Incorrect TFMG version detection that misidentified TFMG 1.2.2 as either 1.2.0 or Community Edition, due to leftover unused classes in the 1.2.2 jar. Detection now checks for version-specific markers instead
- The resistance-timing mixin from 1.0.0 was being applied to every TFMG version except when TFMG was completely absent, even on versions that already fix the bug natively. It's now correctly skipped on any version that already includes the fix
- Resolved TFMG Community Edition's incompatibility flag against this mod. CE had marked this mod as incompatible, specifically because of the redundant resistance-timing mixin above duplicating a fix CE already had built in. Since that mixin is now correctly skipped on CE, this mod no longer touches anything CE already fixes on its own, only adding the Converter block that CE doesn't ship at all
1.0.0 β Initial Release
π Fixed
- Converter stuck at 0V/0A on TFMG 1.2.0. Tracked this down to a timing bug in the mod's electrical network code: the network's resistance value was being recalculated one tick after the Converter had already checked it, so the Converter permanently read a stale value of zero resistance and locked itself at 0W generation. Since nothing ever re-triggered the check afterward, the Converter would stay dead at 0V/0A indefinitely, even with a full FE buffer and a correctly wired network
β Added
- A fix that recalculates the network's resistance immediately, before generation is evaluated each tick, closing the timing gap that caused the bug above
- The Converter can now accept a cable connection from any side, instead of only one fixed side relative to its facing
- The Converter now defaults to output mode when placed, instead of spawning in input mode and needing a wrench tap first
- A safety check that makes the mod skip its patches gracefully, instead of crashing, if a future TFMG update no longer ships the classes it targets
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:fuzRNl2L:Rqlx7RVQ"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:fuzRNl2L:Rqlx7RVQ"
}
