EMC Restocker

Automatically restock learned inventory items with personal ProjectE EMC, nine targets and a dedicated Curios slot.

EMC Restocker

Keep selected supplies topped up by spending your personal ProjectE EMC. EMC Restocker adds a craftable item that buys the missing quantity of learned items while you carry or equip it. Useful for arrows, food, torches and building blocks, with carefully checked support for exact firework variants.

Minecraft 1.21.1 / NeoForge. Install on both the server and participating clients. This is an unofficial ProjectE add-on, not a client-only way to change someone else's server.

Features

  • Nine configurable entries, each with a ghost item selector and total target quantity.
  • Counts matching items across the 36 main inventory and hotbar slots. Armour, offhand and nested container contents do not count.
  • Buys only the deficit. For example, 19 arrows with a target of 64 buys up to 45 arrows.
  • Respects native stack sizes, free inventory space, available personal EMC and your minimum EMC reserve. Surplus is never removed and purchases are never dropped into the world.
  • Requires positive ProjectE EMC and learned knowledge of the exact supported item or variant. It adds no EMC mappings or baseline prices.
  • A dedicated EMC Restocker Curios slot with its own icon, accepting only Restockers while preserving other mods' slots.
  • A rebindable Open EMC Restocker key, initially unbound, for equipped or carried configuration. Right-click opens the particular held Restocker.
  • Simple per-entry status: Ready, Not Learned, No EMC Value, Unsupported Variant, Insufficient EMC or Inventory Full. Hover for an explanation; normal blocked states do not spam chat.
  • Settings stay on the item through movement, saving and restarting. New Restockers start disabled.

Exactly one enabled Restocker operates per player: dedicated functional Curios slot first, other legitimately eligible functional Curios slots next (slot ID, then index), then inventory/hotbar indices 0–35. Disabled items are skipped. Cosmetic/inactive slots do not activate it; unrelated accessory slots are not forced to accept it. Moving items keeps the player's processing cooldown. Duplicate entries are rejected.

Requirements

  • Minecraft 1.21.1 and Java 21.
  • NeoForge 21.1.250 tested; loader range 21.1.250 through the 21.1 series, below 21.2. Other loader versions in that range remain untested.
  • ProjectE 1.1.0 for Minecraft 1.21.1.
  • Curios API 9.5.1+1.21.1 for NeoForge.

The exact ProjectE and Curios versions are required by this release. Project Expansion is not required. Forge, Fabric and other Minecraft versions are not supported.

Crafting

The recipe produces one initially disabled EMC Restocker:

Gold        High Covalence Dust  Gold
Dark Matter Alchemical Chest    Dark Matter
Gold        High Covalence Dust  Gold

Four gold ingots, two High Covalence Dust, two Dark Matter and one Alchemical Chest. The ingredient IDs were checked against ProjectE 1.1.0.

Installation and use

  1. Back up and use a separate test profile/world first. Put emc-restocker-0.1.0.jar in the server and each participating client's mods folder, with the required ProjectE and Curios versions. For singleplayer, install in the playing profile, which hosts its own local server.
  2. Craft the item, hold it and right-click. Pick up an ordinary item from the displayed inventory, click a ghost square and return the real stack to your inventory. The ghost selection never consumes or duplicates that stack. Right-click a ghost or press its × button to clear it.
  3. Enter a total target, not a quantity per slot. Set your minimum personal EMC reserve, enable the item and close its screen. Purchases pause while its configuration screen is open. Target zero disables an entry.
  4. Carry it in the main inventory/hotbar or equip it in its Curios slot. Bind Open EMC Restocker under Controls → EMC Restocker to configure an equipped item. If all eligible items are disabled, the key opens the first eligible one so you can enable it. Offhand items can be configured but do not activate there.
  5. Learn your selected items in ProjectE and keep personal EMC available. Entries process from first to ninth, once per second by default. Earlier entries take priority if EMC or space runs short.

Moving, removing or replacing the item being configured safely invalidates its menu. Ghosts and quantities are validated by the server; clients cannot choose another player, supply a price or manufacture an output stack.

Supported items and exclusions

Version 0.1.0 supports ordinary default stacks that ProjectE can reproduce exactly. Renamed, enchanted, damaged, upgraded or unknown custom variants are rejected with an explanation; their components are not silently stripped.

Potions, enchanted books, buckets, bundles, containers/block-entity items and items exposing stored inventory, fluids or energy are conservatively excluded, even when empty. The separate enchanted-books/potions fix does not extend these restrictions. Restockers cannot buy themselves. No armour, offhand, nested container, Klein Star storage, collector or other player's EMC is used.

Fireworks are conditional: the actual ProjectE processor must persist, positively price and recognize the learned flight/explosion variant exactly. Flight 1–3 is supported within conservative bounds of eight explosions and sixteen colours/fade colours per explosion; unusual rockets can be excluded. Missing processors, unknown data or extra names remain unsupported. Flight-two knowledge does not unlock flight three.

Server owners can configure the master enable switch, tick interval, reserve floor, target maximum, per-cycle purchase limit and exclusions by registry ID or #item_tag, plus the emc_restocker:excluded datapack item tag. Defaults allow targets up to 4,096 and 1,024 purchases per interval. On the tested NeoForge version, settings generate at config/emc-restocker-server.toml; a world-specific file in <world>/serverconfig can override them. Stop the server before editing and restart to apply.

Purchases recheck native knowledge, price, balance and capacity on the server thread and charge exactly for the successfully inserted quantity. Inventory/EMC snapshots roll back an insertion failure. Work is bounded by nine entries, 36 counted inventory slots and a configurable Curios inspection cap (256 slots by default), without scanning the item registry or recalculating EMC. Dead/disconnected players are not processed.

Tested behavior and limits

The compiled production build passed 14 unit tests, 13 minimal dedicated-server runtime groups, 14 full-pack dedicated-server groups and separate server restarts. Comparison of 20,331 existing ProjectE mappings found zero changed values. Tests covered partial purchases, full inventory, reserves, knowledge/component restrictions, ghost safety, duplicates, multiple Restockers, Curios priority, movement/cooldown, disabled/dead states, malformed requests and native saved EMC/knowledge/settings.

An actual NeoForge client joined a local dedicated server with the exact ProjectE and Curios versions. The equipped keybind menu, normal GUI packets, ghost selection, reopened settings, held-item right-click and 19 → 64 arrows with exactly 45 purchases passed. The gallery screenshot shows the real rendered screen.

The graphical client join used the minimal exact-dependency environment. A full graphical modpack join, a live owner's server/player files, long multiplayer load, every modded item, exhaustive byte-level fuzzing and arbitrary power loss were not tested. Transactions are not a power-loss journal. The full-pack server copy used a separate private helper for an unrelated ProjectE Integration 8.3.1 / Ice and Fire 2.1.3 incompatibility; it is not bundled or fixed by Restocker. No playable modpack or live server was modified during development.

Rollback and support

Disable Restockers or the server master switch first. Stop server/clients, remove Restockers from inventories/Curios if desired, then remove the JAR from both sides. Previously purchased ordinary items and correctly charged EMC remain normal game state; uninstalling does not refund purchases. Restore a pre-test backup to undo those transactions. Do not delete ProjectE balances, knowledge or settings.

For issues, include dependency versions and a relevant error excerpt in the project comments, removing personal information from logs.

MIT licensed. Developed with AI assistance and tested locally. Original listing artwork generated with AI assistance. Unofficial; not affiliated with or endorsed by the ProjectE, Curios or Minecraft teams. Their binaries and private validation helpers are not bundled in the production JAR.

EMC Restocker Team

profile avatar
Owner
  • 4
    Projects
  • 755
    Downloads

D1 in Locked btw.

More from JZD