Add experimental option to try to migrate old chunks

This commit is contained in:
Mike Primm 2019-06-09 09:59:08 -05:00
parent 881b7dfefd
commit 286a12c4ef
6 changed files with 56 additions and 5 deletions

View file

@ -120,6 +120,7 @@ public class DynmapCore implements DynmapCommonAPI {
private List<String> sortPermissionNodes;
private int perTickLimit = 50; // 50 ms
private boolean dumpMissing = false;
private static boolean migrate_chunks = false;
private int config_hashcode; /* Used to signal need to reload web configuration (world changes, config update, etc) */
private int fullrenderplayerlimit; /* Number of online players that will cause fullrender processing to pause */
@ -203,6 +204,10 @@ public class DynmapCore implements DynmapCommonAPI {
public final void setBiomeNames(String[] names) {
biomenames = names;
}
public static final boolean migrateChunks() {
return migrate_chunks;
}
public final String getBiomeName(int biomeid) {
String n = null;
@ -447,6 +452,10 @@ public class DynmapCore implements DynmapCommonAPI {
dumpMissing = configuration.getBoolean("dump-missing-blocks", false);
migrate_chunks = configuration.getBoolean("migrate-chunks", false);
if (migrate_chunks)
Log.info("EXPERIMENTAL: chunk migration enabled");
/* Load preupdate/postupdate commands */
ImageIOManager.preUpdateCommand = configuration.getString("custom-commands/image-updates/preupdatecommand", "");
ImageIOManager.postUpdateCommand = configuration.getString("custom-commands/image-updates/postupdatecommand", "");