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