Revert to old leveldb dependency

This commit is contained in:
Jesse Boyd 2017-10-07 18:30:07 +11:00
parent 08bdfe2fd9
commit 6db70e6058
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 16 additions and 2 deletions

View File

@ -502,6 +502,7 @@ public class MCAQueue extends NMSMappedFaweQueue<FaweQueue, FaweChunk, FaweChunk
final int mcaZ = Integer.parseInt(split[2]); final int mcaZ = Integer.parseInt(split[2]);
if (filter.appliesFile(mcaX, mcaZ)) { if (filter.appliesFile(mcaX, mcaZ)) {
File file = path.toFile(); File file = path.toFile();
Fawe.debug("Apply file: " + file.getName());
final MCAFile original = new MCAFile(MCAQueue.this, file); final MCAFile original = new MCAFile(MCAQueue.this, file);
final MCAFile finalFile = filter.applyFile(original); final MCAFile finalFile = filter.applyFile(original);
if (finalFile != null && !finalFile.isDeleted()) { if (finalFile != null && !finalFile.isDeleted()) {

View File

@ -326,11 +326,22 @@ public class ConverterFrame extends JFrame {
debug("Loading leveldb.jar"); debug("Loading leveldb.jar");
File lib = new File("lib"); File lib = new File("lib");
File leveldb = new File(lib, "leveldb.jar");
File leveldb;
URL levelDbUrl;
if (new File(dirMc, "db").exists()) {
leveldb = new File(lib, "leveldb.jar");
levelDbUrl = new URL("https://git.io/vdZ9e");
} else {
leveldb = new File(lib, "leveldb-nukkit.jar");
levelDbUrl = new URL("https://github.com/Nukkit/Nukkit/raw/master/lib/leveldb.jar");
}
// File blocksPE = new File(lib, "blocks-pe.json"); // File blocksPE = new File(lib, "blocks-pe.json");
// File blocksPC = new File(lib, "blocks-pc.json"); // File blocksPC = new File(lib, "blocks-pc.json");
URL levelDbUrl = new URL("https://git.io/vdZ9e");
// URL urlPE = new URL("https://git.io/vdZSj"); // URL urlPE = new URL("https://git.io/vdZSj");
// URL urlPC = new URL("https://git.io/vdZSx"); // URL urlPC = new URL("https://git.io/vdZSx");
@ -342,6 +353,8 @@ public class ConverterFrame extends JFrame {
File newWorldFile = new File(output, dirMc.getName()); File newWorldFile = new File(output, dirMc.getName());
debug("Starting converter...");
MapConverter converter = MapConverter.get(dirMc, newWorldFile); MapConverter converter = MapConverter.get(dirMc, newWorldFile);
converter.accept(ConverterFrame.this); converter.accept(ConverterFrame.this);
} catch (Throwable e) { } catch (Throwable e) {