Phantom's AE2 Tweaks
Fixes and improvements for Applied Energistics 2, mostly about its EMI integration.
Network contents, without the cost
EMI rebuilds the craftables list it derives from an open terminal on every poll, and AE2 hands it the whole network to do that. On a large network a single rebuild costs 250–315 ms, EMI asks for it up to 20 times per second while the craftables sidebar is open, and the terminal drops to single-digit fps.
This keeps that list up to date incrementally instead: the client tracks which keys changed and only re-checks the recipes that use them. Craftoria, 40,565 item types, one network key changing every 500 ms:
| Render thread, 40 s window | AE2 + EMI alone | with this mod |
|---|---|---|
| EMI + AE2 share | 49.5% | 3.1% |
| craftables rebuild | 23.8 s | 6 ms |
| fps | 1–6 | 20–30 |
It covers every terminal that uses AE2's EMI handler, including the wireless ones other addons add by reusing it. The terminal's craftable filter and pattern encoding stop scanning every entry too, and the network inventory is always exposed to EMI (AE2's provideNetworkInventoryToEmi option is forced on).
Craft hotkeys
EMI's craft hotkeys moved a recipe into the crafting grid and then never took the result out, so nothing was crafted. They now fill and craft as EMI intends: one result or a full stack onto the cursor, one craft's worth or as much as fits into the inventory.
Creative order for the mod sort
The terminal's "Mod" sort lists items the way the creative inventory does (its search tab order), variants like potions and enchanted books included, with fluids after the items. It also sorts a 40,000 type view in ~23 ms, where AE2's own name order takes ~880 ms. Set creativeSort = false in config/phantoms_ae2_tweaks-client.toml to get AE2's mod grouping back.
Notes
The EMI work runs on the client. Install it on the server as well for "craft one to inventory", since the craft is taken there; without it, that hotkey falls back to crafting a single result onto the cursor.
Numbers are from one machine and pack, so the absolute values will differ elsewhere.

