/WorldPruner

A simple GUI and command line app to prune chunks from a Minecraft Java Edition world.

Primary LanguageJavaMIT LicenseMIT

WorldPruner

A simple GUI and command line app to prune chunks from a Minecraft Java Edition world.

Make sure you have a backup of your world!

We are not liable for data loss!

Prerequisites

  • Java 17

Usage

There are two ways to use this application: GUI mode and CLI mode.

GUI Mode

The GUI mode offers an easy way to tweak the different parameters of the application.

To use the GUI, open the WorldPruner.jar file with Java.

You simply need to open your world folder with the file chooser, provide a minimum time, a radius and an optional whitelist containing all chunks that should be kept in any case.

sreenshot

CLI Mode

The CLI mode is meant for server owners, to prune their world without needing to download the world first. This mode allows to operate the application from the command line.

Command line arguments:

Argument(s) Default Value Description
--world -w Required The path to the world folder
--time -t 0 seconds The minimum time a chunk should have to be kept
--radius -r 0 The radius of additional chunks preserved around matching chunks
--white-list -W The path to whitelist CSV file
--continue-on-error -c If execution should continue if an error occurs
--white-list-only -l Prune everything except the whitelist, requires --white-list to be set
--debug -d Enables debug logging to the log file, also works for GUI mode
--help -h Prints all available commandline options

Examples:

Prune all chunks that are not older than 1 minute

java -jar WorldPruner.jar --world "/path/to/my/world/" --time "1 minute"

Prune all chunks that are not older than 5 minutes, keep a radius of two chunks and continue if an error occurs

java -jar WorldPruner.jar --world "/path/to/my/world/" --time "5 minutes" --radius 2 --continue-on-error

Prune all chunks that are not older than 1 day, keep a radius of ten chunks and keep all chunks in the whitelist.csv

java -jar WorldPruner.jar --world "/path/to/my/world/" --time "1 day" --radius 10 --white-list "/path/to/whitelist.csv"

Print all available commandline options

java -jar WorldPruner.jar --help

Whitelisting Chunks

You can create and export a whiltelist from MCA Selector. More information on how to create a whitelist can be found here.

If you want to create your own whitelist read this.