Thanks to visit codestin.com
Credit goes to github.com

Skip to content

jellysquid3/anvil-tools-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

anvil-tools-rs

⚠️ This tool might damage your world file! Not a lot of testing has been done here, but my preliminary examination seems to suggest it at least works for my use case.

A small collection of tools to deal with Minecraft's Anvil chunk storage system while out of the game. Might be useful for server operators or people who do not want to wait on Minecraft's "world optimization..."

Features

  • Strip cached world data (similar to the "Optimize World" feature in vanilla)
  • Compress region files for long-term archival (300% to 500% improvement in compression ratio versus compressing the region directory verbatim)

Usage

Use the --help argument for usage information.

Archive Format

The pack command produces an uncompressed tarball in a very simple format, consisting of a directory for each region file, with a file for every chunk within that region. Region directories use the absolute coordinates of the region, and each chunk uses relative coordinates to that region.

While this archive format may seem crude, it was chosen to be as simple as possible for other tools to work with. Unlike a ZIP archive, tarballs lend easily to solid compression, which improves the compression ratio greatly.

Compression is not a concern of this tool, and you should pipe the tarball generated by pack into a compressor of your choice (such as plzip or zstd) and write it out to disk. For an example of how to do this with the pack and unpack commands, see the following.

Packing Region Files

anvil-tools pack --input-dir <PATH> | plzip -9 > <ARCHIVE>

Unpacking Region Files

plzip -d -c <ARCHIVE> | anvil-tools unpack --output-dir <PATH>

Why?

Minecraft's built-in tools have a few issues that occasionally bite me when debugging issues. In no particular order, the vanilla tools...

  • ... are very slow, taking multiple hours on modest worlds.
  • ... often crash due to concurrency issues and heap exhaustion from unbounded queues.
  • ... only support in-place modification, making the previous point more painful.
  • ... require you to have either the Minecraft client or server running.

There also doesn't seem to be any existing tool for compressing Minecraft worlds in an efficient manner, with most backup plugins simply compressing the (already compressed) region files naively. This tool unpacks the region files into a tarball format which is more suitable for compression.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages