For detailed introduction, please refer to README. The following is a brief introduction.
-------------------------------------
How It Works
Chunks are stored within the Anvil file, and Minecraft Java Edition stores a field InhabitedTime for each chunk, which records the cumulative time ticks that players have spent within that chunk.
This tool finds out chunks where players have barely stayed by examining the InhabitedTime value, and then removes them. It can be used on both local game worlds and server worlds.
-------------------------------------
Important Notes Before Use
If you are using a Paper server or a server based on Paper (such as Purpur), DO NOT set the fixed-chunk-inhabited-timeDoc key in the Paper World Configuration file to a value ≥0, as this will fix the InhabitedTime of the chunks, thereby affecting the functionality of the tool.
If your world is created or edited by mods / external softwares rather than manual construction by players, the InhabitedTime values of the chunks may be unpredictable, and it's not recommended to use this tool in such cases.
Of course, you can configure protected chunks to prevent certain chunks from being removed.
This tool performs in-place operations on the region Anvil files, the changes will firstly be written to a temporary file and then replace the original file. It is still advisable to occasionally make backups.
In general, the parameter --world-dirs is enough for routinely chunks pruning.
It specifies comma-separated paths to Minecraft Worlds.
For example, --world-dirs /opt/server/world,world_nether specifies two world directories, one with an absolute path and the other with a relative path. The program will process these worlds one by one.
The parameter --min-inhabited specifies the InhabitedTime threshold for chunks (in ticks, 20 ticks = 1 second).
A chunk with an InhabitedTime less than or equal to this value, and not protectedREADME, will be removed.
For example, if you want to remove chunks where players have stayed for ≤5 seconds, set this to 100.
For additional parameters, please refer to the README.
-------------------------------------
Examples
1. Using as a Standalone Tool
# Remove chunks with a total player stay time <= 5 seconds from the specified three worlds
java -jar PotatoPeeler*.jar --min-inhabited 100 --world-dirs world,world_nether,/opt/server/world_the_end
# Or it can be simpler, just specify the world paths. By default, only chunks with a total player stay time = 0 seconds will be removed
java -jar PotatoPeeler*.jar --world-dirs world,world_nether,/opt/server/world_the_end
2. Using as a Server Wrapper
# Remove chunks with a total player stay time <= 5 seconds from the specified two worlds
# After removal, purpur.jar will be started in the current JVM
# JVM options -Xms1G -Xmx4G will be inherited
# Additional parameters/flags --nogui --forceUpgrade will be passed to purpur.jar
java -Xms1G -Xmx4G -jar PotatoPeeler*.jar --min-inhabited 100 --world-dirs world,world_nether --server-jar purpur.jar --nogui --forceUpgrade
Hello everyone, I'm here to share my newly created tool to remove unused chunks from Minecraft Worlds (Java Edition).
You may regard it as a Java implementation of Aternos Thanos.
In some cases, disk space occupied by the worlds can be reduced by over 50%.
For detailed introduction, please refer to README. The following is a brief introduction.
-------------------------------------
How It Works
Chunks are stored within the Anvil file, and Minecraft Java Edition stores a field InhabitedTime for each chunk, which records the cumulative time ticks that players have spent within that chunk.
This tool finds out chunks where players have barely stayed by examining the InhabitedTime value, and then removes them. It can be used on both local game worlds and server worlds.
-------------------------------------
Important Notes Before Use
-------------------------------------
Usage
You can run this tool from the command line:
In general, the parameter --world-dirs is enough for routinely chunks pruning.
It specifies comma-separated paths to Minecraft Worlds.
The parameter --min-inhabited specifies the InhabitedTime threshold for chunks (in ticks, 20 ticks = 1 second).
For additional parameters, please refer to the README.
-------------------------------------
Examples
1. Using as a Standalone Tool
2. Using as a Server Wrapper
-------------------------------------
License
Open source is love.
This project is licensed under the MIT License.
Thanks for using it! o(* ̄▽ ̄*)o