More things
This commit is contained in:
@@ -41,8 +41,8 @@ public class WorldEngine {
|
||||
this.maxMipLevels = maxMipLayers;
|
||||
this.storage = storage;
|
||||
this.mapper = new Mapper(this.storage);
|
||||
//4 cache size bits means that the section tracker has 16 separate maps that it uses
|
||||
this.sectionTracker = new ActiveSectionTracker(4, storage::loadSection, cacheCount, this);
|
||||
//5 cache size bits means that the section tracker has 32 separate maps that it uses
|
||||
this.sectionTracker = new ActiveSectionTracker(5, storage::loadSection, cacheCount, this);
|
||||
}
|
||||
|
||||
public WorldSection acquireIfExists(int lvl, int x, int y, int z) {
|
||||
|
||||
@@ -131,8 +131,10 @@ public class WorldImporter {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
if (!this.threadPool.isFreed()) {
|
||||
this.threadPool.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
private interface IImporterMethod <T> {
|
||||
void importRegion(T file) throws Exception;
|
||||
@@ -237,6 +239,8 @@ public class WorldImporter {
|
||||
}
|
||||
}
|
||||
onCompletion.accept(this.totalChunks.get());
|
||||
|
||||
this.threadPool.shutdown();
|
||||
this.worker = null;
|
||||
});
|
||||
this.worker.setName("World importer");
|
||||
|
||||
Reference in New Issue
Block a user