Do your factory gauges send out a wave of packages every time you log in or come back to your base, even though everything is already in stock? This addon fixes that.
Fixes Create issue #8190. Not affiliated with the Create team. Please report bugs here.
What it fixes
When a world, dimension or chunk loads, a packager only finds the inventory it's attached to on its own first tick. On top of that, the network's stock count is cached for a second. If a factory gauge ticks before that, it sees less in stock than there really is and places an order. With many gauges that can mean hundreds of packages and a factory that runs for nothing.
With this addon, a gauge that has just loaded waits 2 seconds before it's allowed to order. Then it reads a fresh stock count. Gauges that are already running aren't affected.
Config
config/gauge_reload_fix.properties:
graceTicks: how long a freshly loaded gauge waits before it may order. The default is 40 ticks (2 seconds). Raise it on a slow server.enabled: turn the fix off without removing the mod.
If a Create update changes the code this addon hooks into, the fix switches itself off and logs a warning. It never stops your game from loading. Create plans to fix this bug in 6.0.11; once that's out we'll check it and update this page.
FAQ
Client or server? The server needs it (or your game, in singleplayer). Players don't need it to join.
Does it need anything else? Create 6.0 for Minecraft 1.21.1, on NeoForge.
How is it tested? A game test sets up a factory gauge that makes stone from cobblestone, on a network whose chest already holds 64 of each. It reloads the gauge and the chest's packager from their saved data, the way a chunk load does, and checks that nothing gets ordered. The same test with the fix turned off checks that the bug does happen, so we know the test can actually catch it. A third test empties the chest and checks that the gauge still orders when it should.
Can I use it in my modpack? Yes, go ahead, no need to ask.
MIT. Developed with AI assistance. Source: https://github.com/traelmyx/factory-gauge-reload-fix