A lightweight, intelligent item cleanup system for NeoForge 1.21.1
Smart Item Deleter v2 is a server-side optimization mod designed to automatically clean up dropped item entities when the item count exceeds a defined threshold.
It tracks items individually to ensure fair, efficient, and safe removal — deleting only excess, old, and unimportant drops without disrupting normal gameplay.
✅ Supports NeoForge 21.1.215+, Youer 1.21.1, AsyncYouer-1.21.1
⚙️ Designed for Create-based and heavily modded survival servers
💾 Low overhead, deterministic cleanup cycles
Configuration file:
config/smart_item_deleter_v2-common.toml
| Option | Type | Default | Description |
|---|---|---|---|
| entityCountThreshold | int | 200 | Number of dropped item entities required before cleanup activates. |
| minItemAgeMs | long | 15000 | Minimum age (in milliseconds) before an item becomes eligible for deletion. Prevents immediate removal of new drops. |
| scanIntervalTicks | int | 20 | How often (in ticks) the system scans the world for items (20 ticks = 1 second). |
| scanJitterEnabled | boolean | true | Adds small random offset (±scanJitterTicks) to interval to reduce server tick spikes when multiple mods act simultaneously. |
| scanJitterTicks | int | 2 | Maximum jitter added/subtracted from each cleanup cycle’s timing. |
| consoleDebugLogging | boolean | true | When false, suppresses cleanup summary messages in the server console. |
| deletePercentage | int | 90 | Percentage of eligible items to delete each cycle (0–100). Protects the newest items even when threshold is exceeded. |
| whitelistMode | boolean | false | Toggles whitelist (true) or blacklist (false) filtering behavior. |
| filteredItems | list | [ ] | Accepts exact item IDs (minecraft:stone), tag references (#forge:ingots), or wildcard globs with */? (e.g., minecraft:*, minecraft:oak*) that define which items are protected (blacklist) or targeted (whitelist). |
entityCountThreshold = 250
minItemAgeMs = 15000
scanIntervalTicks = 20
deletePercentage = 80
whitelistMode = false
filteredItems = ["minecraft:nether_star", "minecraft:diamond"]
filteredItems = ["minecraft:oak*"]
This configuration means:
TrackedItemsData, using persistent per-level storage.UUIDdimensionfirstSeenMs (time first detected)lastSeenMs (time last confirmed)minItemAgeMsprotectNamedItems is enabled, items with custom names are ignored entirely — they do not count toward the threshold and are never deleted.firstSeenMs).deletions = min(excess_items, eligible_items * (deletePercentage / 100))
nextInterval = scanIntervalTicks ± scanJitterTicks
to avoid simultaneous heavy-tick bursts when multiple mods or systems run periodic updates.
| Command | Description |
|---|---|
| /cleanup run | Forces a cleanup cycle manually. |
| /cleanup status | (Planned) Displays tracked item count, eligible items, and current thresholds. |
| /cleanup config | Changes values in the config on the fly. |
/cleanup status or a scoreboard-compatible data pointMIT License — freely usable and modifiable.
Please credit Metl_Play if redistributed.
Would be appreciated if I am mentioned in modpacks, but it's not required.
“It’s not just a cleaner mod — it’s a smarter janitor.” 🧠🧹