AE2 Crafting Optimizer

Configurable AE2 crafting, execution, machine-intent, and synchronization optimizations for Forge 1.20.1.

AE2 Crafting Optimizer

English

Performance Optimization for Large AE2 Networks

AE2 Crafting Optimizer (ACO) is a configurable performance add-on for Applied Energistics 2 on Minecraft Forge 1.20.1.

ACO is designed for large industrial modpacks where AE2 networks handle frequent or extremely large autocrafting requests. It reduces repeated work during crafting calculations, machine recipe discovery, terminal synchronization, item transfer, and giant crafting CPU execution.

Version 1.2.0

ACO 1.2.0 rebuilds processing-pattern batching around an exact accepted-execution-count contract.

  • Instant pattern dispatch can process multiple ready tasks and adapter transactions in one crafting CPU call.
  • Each pass is bounded by the CPU operation allowance, a default limit of 1,024 transactions, and a 4 ms wall-clock deadline.
  • Remaining work safely resumes on a later server tick.
  • Energy, task progress, expected outputs, and waiting-output accounting advance only by the number of executions actually accepted.
  • Unaccepted inputs are returned.
  • Unsupported patterns and targets fall back to AE2 before ownership is transferred.
  • Provider backpressure immediately stops further dispatch.

“Instant” means rapid pattern dispatch. It does not skip machine duration, generate outputs directly, or make GTCEu or Mekanism machines process in zero ticks.

Main Features

  • Shares identical active crafting calculations from the same requester and ME network.
  • Uses bounded caches for pattern lookup, craftable-item lookup, missing-item simulation, and repeated calculation work.
  • Invalidates relevant caches when providers, storage, patterns, or network structure change.
  • Provides faster preliminary handling of clearly impossible crafting requests.
  • Applies adaptive per-CPU and shared per-ME-grid execution budgets.
  • Prevents multiple giant crafting CPUs from independently consuming the entire tick budget.
  • Reuses terminal inventory snapshots and craftable lists for short configurable intervals.
  • Coalesces selected client-visible terminal and storage synchronization.
  • Optimizes selected Import Bus, Export Bus, IO Port, Assembly Matrix, Circuit Cutter, Reaction Chamber, and AE2 Overclock hot paths.
  • Captures Pattern Provider processing intent.
  • Uses validated GTCEu Modern and Mekanism recipe candidates before their normal full search.
  • Supports item, fluid, and chemical-aware recipe-intent lookup where available.
  • Includes diagnostics for slow crafting calculations and optimizer statistics.

Safety

AE2 remains the authoritative source for crafting plans, missing ingredients, job submission, storage mutation, and network state.

ACO does not:

  • Add or remove recipes.
  • Change crafting eligibility.
  • Replace AE2’s crafting graph solver.
  • Change storage contents.
  • Change machine recipes, processing duration, energy costs, or output generation.
  • Increase displayed crafting storage or co-processor counts.
  • Change Advanced AE Quantum Computer structures.
  • Submit a crafting job that AE2 would reject.

ACO 1.2.0 includes an internal batch-adapter API for integrations capable of reporting a durable accepted execution count. The built-in AE2 and Advanced AE adapter remains conservative and preserves one original pushPattern call per accepted execution. The former unsafe aggregate-input implementation remains permanently disabled.

Requirements

  • Minecraft 1.20.1
  • Forge 47.4.18 or newer
  • Java 17
  • Applied Energistics 2 15.4.10 (15.4.x)

Install the same ACO JAR on the dedicated server and every client.

GTCEu Modern, Mekanism, Advanced AE, and Neo ECO AE Extension integrations are optional. Missing optional mods do not activate their integrations.

Configuration

Server configuration:

<world>/serverconfig/ae2_crafting_optimizer-server.toml

All major optimization groups can be enabled or disabled. Setting enableOptimizer = false disables all ACO behavior for comparison and recovery testing.

Existing worlds retain their current configuration after updating. Back up the world and test pack-specific automation before enabling experimental or disabled-by-default options.

Compatibility and Reporting

ACO applies Mixins to AE2 15.4.x internals. Compatibility with other AE2 release series requires testing.

When reporting a problem, first reproduce it after restarting with enableOptimizer = false. Report ACO-specific issues to this project rather than AE2 or integrated mod developers unless the issue also occurs without ACO.

Source code and issue tracker:
https://github.com/syarukasu/ae2-crafting-optimizer

License: GNU Lesser General Public License v3.0 only (LGPL-3.0-only)


日本語

大規模AE2ネットワーク向け最適化MOD

**AE2 Crafting Optimizer(ACO)**は、Minecraft Forge 1.20.1向けApplied Energistics 2最適化アドオンです。

頻繁な自動クラフトや非常に巨大なクラフト要求を扱う工業環境を対象とし、クラフト計算、機械のレシピ探索、端末同期、アイテム搬入出、巨大クラフトCPUによる処理集中を軽減します。

バージョン1.2.0

ACO 1.2.0では、処理パターンのバッチ機構を「実際に受理された完全な実行回数」を返す方式として作り直しました。

  • 一回のクラフトCPU呼び出しで複数の実行可能タスクを投入できます。
  • 既定ではCPU操作数、最大1,024トランザクション、実時間4 msで制限します。
  • 残りの処理は後続tickへ安全に持ち越します。
  • 電力、タスク進捗、期待出力、出力待ち数は実際に受理された回数だけ更新します。
  • 受理されなかった入力は返却します。
  • 非対応パターンや対象は、入力の所有権を移す前にAE2本来の経路へ戻します。
  • Providerが詰まった場合は、その時点で追加投入を停止します。

ここでいう「即時」はパターン投入を素早く進める機能です。機械の処理時間を飛ばしたり、出力を直接生成したり、GTCEuやMekanismの機械をゼロtick化したりはしません。

主な機能

  • 同一の進行中クラフト計算を一本化します。
  • パターン、クラフト可能品、欠品シミュレーション、計算途中の結果を上限付きでキャッシュします。
  • Provider、ストレージ、パターン、ネットワーク構造の変更時に関連キャッシュを無効化します。
  • 明らかに在庫不足のクラフト要求を早期に処理します。
  • CPU単位の適応実行予算とMEグリッド全体の共有予算を適用します。
  • 複数の巨大CPUがそれぞれtick時間を使い切ることを防ぎます。
  • ME端末の在庫スナップショットとクラフト可能一覧を短時間再利用します。
  • 一部の端末・ストレージ同期をまとめて処理します。
  • Import Bus、Export Bus、IO Port、組立マトリックス、回路スライサー、反応室、AE2 Overclockの一部処理を最適化します。
  • Pattern Providerから機械へ渡される処理目的を記録します。
  • GTCEu ModernとMekanismでは、通常の全探索前に検証済み候補を試します。
  • 利用可能な連携では、アイテム・液体・化学物質を含むレシピ探索に対応します。
  • 遅いクラフト計算や最適化状況を確認する診断機能を追加します。

安全性

クラフト計画、欠品判定、ジョブ投入、ストレージ操作、ネットワーク状態は引き続きAE2が最終決定します。

ACOは以下を変更しません。

  • レシピの追加・削除
  • クラフト可否
  • AE2のクラフトグラフソルバー
  • ストレージ内容
  • 機械のレシピ、処理時間、消費電力、出力生成
  • 表示上のクラフトストレージ容量とコプロセッサ数
  • Advanced AE Quantum Computerの構造
  • AE2が拒否するクラフトジョブの強制実行

ACO 1.2.0には、永続的な実受理数を保証できる連携向けの内部バッチAPIがあります。標準AE2・Advanced AE向けアダプタは、安全性のため実受理一回につき元のpushPatternを一回呼び出します。以前の安全でない入力集約処理は恒久的に無効化しています。

必須環境

  • Minecraft 1.20.1
  • Forge 47.4.18以上
  • Java 17
  • Applied Energistics 2 15.4.10(15.4.x

サーバーとクライアントへ同じACOのJARを導入してください。

GTCEu Modern、Mekanism、Advanced AE、Neo ECO AE Extensionは任意連携です。対象MODが存在しない場合、その連携処理は適用されません。

Config

設定ファイル:

<ワールド>/serverconfig/ae2_crafting_optimizer-server.toml

主要な最適化機能はConfigで個別に切り替えられます。enableOptimizer = falseにすると、比較試験や復旧確認のためACOの全処理を停止できます。

既存ワールドではアップデート後も現在の設定値が保持されます。実験的な機能や既定で無効な機能を有効化する前に、ワールドをバックアップして自環境の設備で確認してください。

互換性と問題報告

ACOはAE2 15.4.x内部へMixinを適用します。別のAE2系列で使用する場合は動作確認が必要です。

問題が発生した場合は、まずenableOptimizer = falseへ変更して再起動し、同じ条件で再現するか確認してください。ACOを無効化すると発生しない問題は、AE2や連携先MODではなくACO側へ報告してください。

ソースコード・Issue:
https://github.com/syarukasu/ae2-crafting-optimizer

ライセンス: GNU Lesser General Public License v3.0 only(LGPL-3.0-only

The AE2 Crafting Optimizer Team

profile avatar
  • 3
    Projects
  • 244
    Downloads

More from syarukasu