tfmgfix-2.0.0
Curse Maven Snippet
What's new
This build targets TFMG 1.2.2 and refuses to load next to 1.2.0. Stay on tfmgfix-1.2.0.jar if you are still on TFMG 1.2.0 — the two are not interchangeable, and the reason is below.
New in TFMG 1.2.2, and the reason a server settles at a few TPS after a while of play.
1.2.2 added IElectric.doActionNextTick(...), which appends to ElectricBlockValues.scheduledActions, and drains that list from tickElectricity() with forEach. Nothing ever removes an entry — the field is assigned exactly once, in the constructor, which is every access to it in the whole jar. So an action scheduled once keeps running on every tick, forever, and the cost of an electrical grid grows without bound with playtime. Reloading the world clears it, because the list is not saved, which is why the lag comes back gradually instead of staying constant.
What accumulates is not cheap. Five call sites schedule work — cable hubs and cable connectors on placement and on any neighbour change, and the network on every update — and four of the five end in checkForFEOutputs, which rebuilds its map with one capability lookup per side, in the expensive form that makes NeoForge resolve the block state and the block entity itself. Six of those per accumulated copy, per tick.
A server profile of an affected save:
tickBlockEntities 92.5%
IElectric.tickElectricity 79.8%
CableHubBlock.lambda$onNeighborChange$0 72.6%
IElectric.checkForFEOutputs 57.3%
BlockCapability.getCapability 49.4%
Each action now runs once and is dropped, which is what doActionNextTick means. They still run, still on the tick after they were scheduled, still in order.
One behavioural difference, stated plainly. The FE-neighbour scan used to re-run every tick, so a machine that swapped its energy handler without a block update was picked up within a tick. It is now picked up when something actually changes next to the cable — which is what schedules the scan. Placing, breaking and block-state changes all fire a neighbour change, so the ordinary cases are covered.
- Electric motor loop. In 1.2.2
ElectricMotorBlockEntity.onNetworkChangedno longer callsupdateNextTick(), so the permanent 20-per-second network rebuild is gone from the mod itself. - Empty accumulator loop.
AccumulatorBlockEntity.tick()no longer asks for a recalculation while the bank sits empty.
Both signatures also changed — onNetworkChanged went from (II)V to (IF)V. That is why tfmgfix-1.2.0.jar cannot run on TFMG 1.2.2: with "defaultRequire": 1 two injection points disappear at once and the game refuses to start, which from outside looks like a modpack that loads forever.
Quadratic network update (getCableCurrent computed once per update instead of once per cable), the large switch reconnect throttle, and the three goggle tooltips that crash the client when a multiblock loses its controller — steel tank, distillation controller, engine.
The build now verifies every injection point against the target jar before compiling: method descriptors, @At targets against the constant pool, @Shadow members, and that no mixin is listed without a class or compiled without being listed. It is proved by making it fail, not by watching it pass.
All Relations
- All Relations
- Embedded Library
- Optional Dependency
- Required Dependency
- Tool
- Incompatible
- Include
This mod has no related projects

