Sueta
MA

MapDiff

1.0.0

Refresh your map without starting over!

·Plugin

MapDiff compares your existing world and a clean copy, then copies chunks that are significantly different into a new world. Options allow you to customize which chunks will be kept, including the minimum number of changes that count as "significant", whether chunks near a changed chunk should be kept, and more!

USAGE: No GUI; CLI only, sorry. Run as a standalone JAR. You may want to give it extra RAM for larger maps, but you'll mostly be limited by your CPU power.
Flags are as follows:

  • Required:
    • --real=<path>
      • The path to the world folder of your existing world.
    • --base=<path>
      • The path to the world folder of the clean world you generated. Must not be the same as the existing world.
      • You can use this option more than once. A chunk must exceed the change threshold for every base world in order to count as "changed"; if it is below the threshold for at least one base world, it will not be kept unless it's within the --keep-adjacent-chunks radius.
    • --new=<path>
      • The path to the world folder where the changed chunks will be written. Must not be the same as the existing world or the base world. Will overwrite any files with the same name, but will not remove files that it doesn't need to overwrite; I recommend pointing this at an empty folder.
  • Optional:
    • --max-changes=<number>
      • The maximum number of changes per chunk without the chunk being considered "significantly different". Default is 300.
    • --keep-adjacent-chunks=<number>
      • The square (not taxicab or Euclidean) radius of chunks that should be kept surrounding changed chunks. Chunks in this radius will be kept regardless of whether they were changed. This can be set to zero but must not be a negative number. Default is 2.
    • --(no-)ignore-lava
      • Treat lava and air as equivalent blocks (only for change counting, doesn't edit world). Handy when random lava flows are being annoying. Default is --no-ignore-lava.
    • --(no-)ignore-water
      • Same as above, except with water. Default is --no-ignore-water.
    • --(no-)keep-nonbase-chunks
      • Keep chunks that are in the 'real' world but is not present in any of the base worlds specified. Chunks that are in at least one base world are subject to the normal threshold rules. Default is --keep-nonbase-chunks.

Please report bugs to me via PM. If you report a bug via a review, I may not be able to fix it because I can't get detailed info or do any troubleshooting via reviews.

IMPORTANT: This tool takes a VERY long time to run. It is comparing literally every block in every chunk in multiple worlds, and if you're considering a map refresh, then your world probably isn't all that small, either. I can't give good numbers on how long a given map size will take to process because it depends on how how good your CPU is (cores, speed, etc) and if you're doing anything else at the same time. It does use multi-threading to speed up the processing, but that can only help so much for very large maps.

DISCLAIMER: Make a backup of your world before using this tool. It's 100% your fault if this gives you a corrupted map and you don't test it or have a backup of your world before uploading the refreshed map to your server. This tool creates a new map in a separate folder and doesn't modify any of the maps it's working on, so I can't fix your old map if you nuke it.

Similar projects

Plugin →