A fast and efficient Rust-based tool for Minecraft server administrators to detect potential duplication stashes and monitor valuable item distribution across worlds and player inventories.
ChunkScanner recursively scans Minecraft region files (.mca) and player data files (.dat) to identify locations and players that exceed configured thresholds for specific items. This helps server administrators quickly locate suspicious concentrations of valuable items that may indicate duplication exploits or require investigation.
- π World Scanning: Analyzes all containers in region files (chests, shulker boxes, hoppers, etc.)
- π€ Player Scanning: Examines player inventories and ender chests
- π Recursive Container Analysis: Automatically scans nested containers (shulker boxes within shulker boxes)
- βοΈ Configurable Thresholds: Customize which items to flag and at what quantities
- π― Regex Support: Use pattern matching for flexible item detection (e.g., all smithing templates)
- π Multi-threaded Processing: Parallel scanning for maximum performance
- π Glob Pattern Support: Flexible file path specifications with wildcards
- π Detailed Reporting: Clear output showing exact locations and quantities
- πΎ Flexible Output: Log to files or stdout
- Rust 1.70+ (Install Rust)
git clone https://github.com/yourusername/chunkscanner.git
cd chunkscanner
cargo build --releaseThe binary will be available at target/release/chunkscanner.
./chunkscanner create-configThis creates a chunkscanner.toml file with default settings.
Edit chunkscanner.toml to customize what items to scan for:
check_player_data = true
check_worlds = true
player_data_files = ["./world/playerdata/"]
region_files = [
"./world/region/*",
"./world_nether/DIM-1/region/",
"./world_the_end/DIM1/region/",
]
log_file = "stdout"
[[items]]
pattern = "minecraft:netherite_ingot"
min_count = 10
is_regex = false
[[items]]
pattern = "(.*)_smithing_template"
min_count = 5
is_regex = true./chunkscanner scan| Command | Description |
|---|---|
scan |
Automatic scan using config file |
create-config [file] |
Create default configuration |
scan_world <paths...> |
Manual world file scanning |
scan_players <paths...> |
Manual player data scanning |
help |
Show help information |
| Setting | Type | Description |
|---|---|---|
check_player_data |
boolean | Enable/disable player inventory scanning |
check_worlds |
boolean | Enable/disable world region scanning |
player_data_files |
array | Paths to player data files/directories |
region_files |
array | Paths to region files/directories |
log_file |
string | Output destination ("stdout" or filename) |
items |
array | List of items to scan for |
Each item in the [[items]] array supports:
pattern: Item ID or regex patternmin_count: Minimum quantity to trigger a flagis_regex: Whether to treat pattern as regex
# Scan specific region files
./chunkscanner scan_world ./world/region/r.0.0.mca ./world/region/r.1.0.mca
# Scan entire region directory
./chunkscanner scan_world ./world/region/# Scan playerdata directory
./chunkscanner scan_players ./world/playerdata/
# Scan specific player files
./chunkscanner scan_players player1.dat player2.dat# Create named config
./chunkscanner create-config production.toml
# Use specific config file
./chunkscanner scan --config production.tomlπ Scan configuration:
β’ Check player data: true
β’ Check worlds: true
β’ Player files found: 15
β’ Region files found: 64
π€ Scanning player files...
Processed: player1.dat (1/15) - No items found
Processed: player2.dat (2/15)
π Scanning world files...
Processed: r.0.0.mca (1/64)
Processed: r.1.0.mca (2/64) - No items found
SCAN RESULTS:
Player SuspiciousPlayer contains minecraft:netherite_ingot -> 127x
---- End of player info for SuspiciousPlayer ----
=== r.0.0.mca ===
Chunk at block coordinates (256, 512) contains minecraft:bundle -> 15x
Chunk at block coordinates (272, 512) contains pattern (.*)_smithing_template -> 23x total
---- End of chunk info for (1, 2) ----
---- End of file info for r.0.0.mca ====
β
Automatic scan complete!
π Files scanned: 79
π― Files with items: 2
The default configuration scans for these potentially suspicious items:
| Item | Threshold | Notes |
|---|---|---|
| Bundles | 1+ | Rare item that may indicate duping |
| Smithing Templates | 5+ | Valuable and limited items |
| Enchanted Golden Apples | 5+ | Extremely rare in survival |
| Netherite Blocks | 1+ | Requires significant resources |
| Netherite Ingots | 10+ | High-value items |
| Shulker Shells | 10+ | Limited mob drops |
Use regex patterns to match multiple items:
# Match all smithing templates
[[items]]
pattern = "(.*)_smithing_template"
min_count = 3
is_regex = true
# Match all music discs
[[items]]
pattern = "minecraft:music_disc_(.*)"
min_count = 5
is_regex = trueregion_files = [
"./world/region/*",
"./world_nether/DIM-1/region/*",
"./world_the_end/DIM1/region/*",
"./creative_world/region/*",
]log_file = "scan_results.txt"ChunkScanner is designed for efficiency:
- Multi-threaded: Utilizes all CPU cores for parallel processing
- Memory efficient: Processes files individually to minimize RAM usage
- Fast parsing: Uses optimized NBT parsing libraries
- Selective scanning: Only processes relevant container data
Performance depends on server size and item distribution as well as CPU and disk speed. Typical performance metrics:
- ~100-600 region files per minute
- ~100-2000 player files per minute (These are rough estimates based on manual testing with over 18,000 region files, not formal benchmarks)
We welcome contributions! Please feel free to:
- Report bugs or suggest features via GitHub issues
- Submit pull requests with improvements
- Add support for additional item types or detection methods
- Advanced item NBT data analysis (enchantments, custom names, etc.)
- Web-based dashboard for results visualization
- Integration with server plugins for real-time monitoring
- Statistical analysis and anomaly detection
- Support for modded items and custom NBT structures
- Database storage for historical tracking
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is designed to help server administrators maintain fair gameplay. Always investigate flagged locations manually before taking action, as legitimate players may accumulate items through normal gameplay or trading.