Skip to content

Trimming chunks

pop4959 edited this page Jan 31, 2024 · 8 revisions

The trim command in Chunky allows you to trim your worlds. This means that any and all chunks outside of the selected region selected will be permanently deleted. This is great when you make a mistake while pre-generating and generate too many chunks, or if you are trying to clean up chunks outside of your world border.

Warning: Chunks that are deleted CANNOT be restored without a backup. Before continuing, you should ensure that you have a full and working backup of your server in case you make a mistake or anything bad happens. Do not ask for support if you've accidentally deleted your world. We will not be able to help you.

To trim, simply select the region you wish to keep using the selection commands, or run the full trim command with all parameters (recommended, since that way you can't forget anything).

For example, if you want to delete all chunks outside of a square region in "world", centered at 0, 0 with a 10000 block radius, you could use the following command:

chunky trim world square 0 0 10000

Read the confirmation message carefully before committing to the trim. Double check that the selection is accurate, and make sure you have a backup of your world. After finishing the trim, you must restart your server to ensure that deleted chunks do not remain in memory. Minecraft and plugins will misbehave in unexpected ways when chunks are deleted unless you do this.

If you use a map rendering plugin, such as Dynmap, you will need to re-render the world to remove deleted chunks from the map.

For example, with Dynmap, the following commands can be used:

dynmap pause all
dynmap purgeworld <world>
dynmap pause none
dynmap fullrender <world>

For BlueMap, this would simply be:

bluemap purge <map>

A visualization of trim can be seen below:

Before Trim After Trim