An Optimization Module for the Create DLC of the AFoP Modpack
As factory scales continue to grow, large numbers of Create machines constantly perform recipe lookups and fluid network updates, gradually increasing server computational pressure.
This mod provides low-level optimizations for common high-frequency operations in Create. While preserving machine behavior and production efficiency as much as possible, it reduces redundant calculations, allowing large-scale automation lines to run more smoothly.
Recipe Query Optimizations
Mechanical Saw
Caches cutting recipes for matching materials and reuses query results under the same input and filter conditions, reducing the overhead of repeatedly scanning the recipe list.
Mechanical Arm
Caches the recipe corresponding to the item currently being processed and the tool held by the arm. When the same processing combination occurs consecutively, the cached result can be reused, reducing redundant calculations in large mechanical arm arrays.
Filling Tank
Caches whether an item can be filled and the required fluid amount for specific item-fluid combinations, reducing recipe judgment frequency in repetitive filling production lines.
Mechanical Crafter
Caches crafting results based on the grid layout, item types, and quantities. When the same crafting structure runs again, it no longer needs to perform a full recipe matching process.
Fluid Network Optimization
Reduces the update frequency of fluid transport systems, consolidating pipe network calculations to once every two game ticks while compensating with increased per-tick transfer volume. This reduces computational overhead from fluid networks while maintaining overall throughput as much as possible.
Cache Safety Mechanisms
To prevent anomalies with special items or complex recipes, items with custom NBT data and scenarios such as sequenced assembly are automatically bypassed from unsafe cache paths.
All recipe caches are automatically cleared when the server starts or reloads data packs, preventing outdated recipe results from persisting. Caches also have capacity limits to prevent unbounded growth over time.
Optimization Results
The optimization process generally does not change how players interact with the mod, nor does it require redesigning existing production lines. Changes may be less noticeable in small factories, while large facilities with numerous repetitive processing machines, mechanical crafters, or complex fluid networks typically benefit more.

