Warning
This software is highly experimental. Use at your own risks and report any bugs by submitting an issue on GitHub.
Minecraft World Optimizer is a command-line tool designed to reduce the size of your Minecraft world by parsing and optimizing region files. It's particularly useful for large worlds that have many generated but unexplored chunks.
The optimizer employs the following steps to analyze and optimize your world:
- Parallel Processing: Leverage all available threads on your computer to load and parse region files simultaneously, improving processing speed.
- Invalid File Removal: Deletes any invalid region files, such as those with insufficient size to hold chunk data.
- Chunk Parsing & Removal:
- Ignores and deletes invalid chunks within valid region files.
- Removes not fully generated or unexplored chunks to reduce world size.
- Improved Compression: Chunks are saved back using the best available compression level for further space optimization.
The optimizer operates in-place, replacing original region files with optimized ones. Always make a backup before running!
Minecraft supports several compression algorithms for chunk data inside the region files. The Minecraft World Optimizer currently only supports the deflate compression algorithm, Zlib and GZip, as deflate is the default for most clients and servers. If your world uses a different compression method, you may experience data loss.
The Minecraft World Optimizer has only been successfully tested on 1.20.6 and 1.21 worlds.
The Minecraft World Optimizer as successfully been tested on the following worlds:
- Server World: Backed-up world of my survival server with over 13.9 million generated chunks.
- New World: New amplified world pre-generated using Chunky with a square radius of 1024.
World | Before Optimization | After Optimization | Size Reduction |
---|---|---|---|
Server World | 105,681,020 Kilobytes 24,381 Files |
16,145,728 Kilobytes 6,961 Files |
84.7% |
New World | 235,204 Kilobytes 36 Files |
2,440 Kilobytes 4 Files |
98.9% |
- Rust toolchain (stable)
- A backed-up Minecraft world
cargo install --git https://github.com/Quozul/minecraft_world_optimizer.git
- Clone the repository:
git clone https://github.com/Quozul/minecraft_world_optimizer.git cd minecraft_world_optimizer
- Install the optimizer globally:
cargo install --path .
minecraft_world_optimizer [WORLD_PATH]...
Replace <WORLD_PATH> with the path to your Minecraft world folder containing region files. It will detect the 3 vanilla dimensions and optimise them. Note that this has not been tested on modded worlds with multiple dimensions.
Example:
minecraft_world_optimizer ~/.minecraft/saves/MyWorld
It can also be used to optimize a server's worlds as dimensions are split in multiple worlds:
minecraft_world_optimizer /path/to/server/world*
# Or if your shell does not support wildcard:
minecraft_world_optimizer /path/to/server/world /path/to/server/world_nether /path/to/server/world_the_end
Contributions are welcome! If you encounter any issues or have suggestions for improvement, please submit an issue or pull request on GitHub. Make sure to follow the existing code style and include relevant tests.
- Fork the repository.
- Create a new branch
git checkout -b <branch-name>
. - Make changes and commit
git commit -m 'Add some feature'
. - Push to your fork
git push origin <branch-name>
. - Submit a pull request.