Delete missing cell contents
Mod version shipped with FlammiCraft: 19.68.0
Permission level 2 is required. The global variant also works from the server console and authorized remote server commands. No player needs to hold a cell or stand beside an ME network.
Inspect and clean the entire world
/ae2 missingcontent global inspectstarts a world-wide preview.- Wait for its completion message. The pass sends no progress messages to chat; it ends with exactly one status message: finished, incomplete or cancelled, or stopped after an error.
/ae2 missingcontent global statusreports progress on request. Reports include checked records, cell inventories, found and deleted entries, and unresolved records. Up to 20 examples show original types, IDs and amounts. /ae2 missingcontent global purge confirmstarts a fresh pass and deletes positively missing contents found then./ae2 missingcontent global purgestarts a preview only./ae2 missingcontent global cancelstops after already submitted writes finish. Completed changes are not automatically rolled back.
The pass includes every currently registered dimension, active and unloaded chunk/entity data, online inventories and ender chests, and saved offline player files. It also visits cells in chests and nested inventories serialized inside items. TDAE2Additions adds Sophisticated Backpacks' central content store, including bags belonging to offline players and nested bags. Other externally managed inventories need an appropriate adapter.
The job reads existing region files without generating or force-loading chunks. Live inventories use their normal setters to preserve storage caches and change notifications. Records loading or unloading concurrently are deferred. Records that remain unresolved, or live mod inventories that cannot be changed safely, produce an incomplete result and retain their data. Consult the server log, resolve the cause and run another global pass.
For loaded players and entities, the job also checks the data they would save. It counts missing cell entries it finds outside accessible inventories and reports the record as unresolved. An adapter for the affected inventory is needed to clean those entries.
Empty region files (0 bytes) count as regions without chunks, as in vanilla. A damaged or truncated region file whose offset table is shorter than 4 KiB is skipped, and so is a single unreadable chunk. The pass continues with the remaining files and finishes as incomplete, naming the number of such files and up to five of them, such as minecraft:the_nether region/r.-1.-100.mca. The server log names each affected file once. Nothing is written to or repaired in these files.
Before changing a record, the job backs up its original content under data/ae2_missing_content_backup/<run-id>/ in the world directory and reports that path. Backups are neither automatically deleted nor automatically restored. An error stops further changes; completed changes remain. Preview does not write cleaned inventories or create these backups.
The job works incrementally without freezing the world. Avoid moving cells between inventories during a pass. Preview does not freeze its targets: confirmed cleanup checks the then-current data again. Duration and backup size depend on the world and the affected records.
Clean one held cell
- Remove the cell from its ME Drive or ME Chest. Close any open portable-cell menu.
- Hold exactly one cell in your main hand and run
/ae2 missingcontent inspect. - Review the original types, IDs and amounts. Amounts use original storage units, such as millibuckets for fluids. At most 20 individual entries are displayed; the total also includes omitted entries.
/ae2 missingcontent purge confirmpermanently deletes proven missing entries from the cell currently held. It checks the cell again; a preview does not reserve its target.
/ae2 missingcontent and /ae2 missingcontent purge also produce previews only. A normal chat confirmation does not execute cleanup.
Valid contents, registry aliases, upgrades and settings remain intact. Unknown key types, malformed recovery payloads and arbitrary codec failures are not automatically deleted. Unclassified placeholders are retained and counted. Tools with internal storage are unsupported.
AE2 recognizes missing items and fluids. Addons register additional serialized key types through the API. TDAE2Additions adds appmek:chemical when Applied Mekanistics and Mekanism are present. Entries without a matching detector are preserved.
Addon API
appeng.api.storage.MissingContentCleanup.register(typeId, detector) registers one detector per serialized AEKey type ID during common setup. Duplicate registrations are rejected. AE2 has no Mekanism dependency.
The detector receives the original registry ID and a copy of its serialized payload. Return MISSING only for a positively absent registry ID, resolving aliases first. PRESENT, UNKNOWN, missing detectors and runtime failures preserve the entry. classify checks one key; plan creates an immutable cleanup plan without modifying a cell. Other callers must enforce server authority, permissions and invalidation of mounted-cell caches themselves.
registerWorldStorage(id, server -> iterator) adds externally managed inventories. Each WorldInventory supplies a description and an unchanged NBT snapshot. Its replace must apply and save the replacement on the server thread and refresh its own caches or open menus. The global job backs up the snapshot before calling it. Only proven missing entries in recognized cell components are removed; other NBT fields remain intact.
After installing matching client/server builds, verify a separate test cell including save/reload. Automated checks do not replace gameplay acceptance.