From 4b9058bc7ac017981e92e21194652339f9af00a6 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sat, 14 Oct 2017 20:14:27 +1100 Subject: [PATCH] * --- .../fawe/object/clipboard/remap/WikiScraper.java | 2 -- .../fawe/nukkit/core/converter/ConverterFrame.java | 12 ++++++------ .../fawe/nukkit/core/converter/LevelDBToMCAFile.java | 11 +++++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/core/src/main/java/com/boydti/fawe/object/clipboard/remap/WikiScraper.java b/core/src/main/java/com/boydti/fawe/object/clipboard/remap/WikiScraper.java index 25cc2829..c495ef90 100644 --- a/core/src/main/java/com/boydti/fawe/object/clipboard/remap/WikiScraper.java +++ b/core/src/main/java/com/boydti/fawe/object/clipboard/remap/WikiScraper.java @@ -81,8 +81,6 @@ public class WikiScraper { int endIndex = text.indexOf(footer, headerIndex); String part = text.substring(headerIndex, endIndex == -1 ? text.length() : endIndex); -// System.out.println(part); - for (String line : part.split("\n")) { if (line.startsWith("| {{")) { String[] split = line.split("\\|\\|"); diff --git a/nukkit/src/main/java/com/boydti/fawe/nukkit/core/converter/ConverterFrame.java b/nukkit/src/main/java/com/boydti/fawe/nukkit/core/converter/ConverterFrame.java index f0bf2e7e..e2bfab71 100644 --- a/nukkit/src/main/java/com/boydti/fawe/nukkit/core/converter/ConverterFrame.java +++ b/nukkit/src/main/java/com/boydti/fawe/nukkit/core/converter/ConverterFrame.java @@ -65,8 +65,6 @@ public class ConverterFrame extends JFrame { private BrowseButton browseSave; public ConverterFrame() throws Exception { - async(() -> downloadDependencies()); - final MovablePanel movable = new MovablePanel(this); movable.setBorder(BorderFactory.createLineBorder(new Color(0x28, 0x28, 0x29))); @@ -294,6 +292,8 @@ public class ConverterFrame extends JFrame { movable.add(bottomBar, BorderLayout.SOUTH); this.setVisible(true); this.repaint(); + + async(() -> downloadDependencies()); } public void prompt(String message) { @@ -368,7 +368,7 @@ public class ConverterFrame extends JFrame { try { MainUtil.download(levelDbUrl, leveldb); MainUtil.loadURLClasspath(leveldb.toURL()); - } catch (IOException e) { + } catch (Throwable e) { e.printStackTrace(); } }); @@ -376,7 +376,7 @@ public class ConverterFrame extends JFrame { pool.submit((Runnable) () -> { try { scraper.scapeOrCache(WikiScraper.Wiki.ITEM_MAPPINGS_PE); - } catch (IOException e) { + } catch (Throwable e) { e.printStackTrace(); } }); @@ -384,7 +384,7 @@ public class ConverterFrame extends JFrame { pool.submit((Runnable) () -> { try { scraper.scapeOrCache(WikiScraper.Wiki.ITEM_MAPPINGS_PC); - } catch (IOException e) { + } catch (Throwable e) { e.printStackTrace(); } }); @@ -392,7 +392,7 @@ public class ConverterFrame extends JFrame { pool.submit((Runnable) () -> { try { scraper.scapeOrCache(WikiScraper.Wiki.ENTITY_MAPPINGS); - } catch (IOException e) { + } catch (Throwable e) { e.printStackTrace(); } }); diff --git a/nukkit/src/main/java/com/boydti/fawe/nukkit/core/converter/LevelDBToMCAFile.java b/nukkit/src/main/java/com/boydti/fawe/nukkit/core/converter/LevelDBToMCAFile.java index 3920b169..f43d3cce 100644 --- a/nukkit/src/main/java/com/boydti/fawe/nukkit/core/converter/LevelDBToMCAFile.java +++ b/nukkit/src/main/java/com/boydti/fawe/nukkit/core/converter/LevelDBToMCAFile.java @@ -6,7 +6,7 @@ import com.boydti.fawe.jnbt.anvil.MCAQueue; import com.boydti.fawe.jnbt.anvil.MCAQueueMap; import com.boydti.fawe.jnbt.anvil.MutableMCABackedBaseBlock; import com.boydti.fawe.jnbt.anvil.filters.RemapFilter; -import com.boydti.fawe.object.clipboard.ClipboardRemapper; +import com.boydti.fawe.object.clipboard.remap.ClipboardRemapper; import com.boydti.fawe.object.io.PGZIPOutputStream; import com.boydti.fawe.util.MemUtil; import com.boydti.fawe.util.ReflectionUtils; @@ -158,16 +158,19 @@ public class LevelDBToMCAFile extends MapConverter { List tags = read(value); for (NamedTag nt : tags) { com.sk89q.jnbt.Tag ent = nt.getTag(); -// chunk.setEntity((CompoundTag) ent); + chunk.setEntity((CompoundTag) ent); } break; + case PendingTicks: + break; + case BlockExtraData: + System.out.println("EXTRA " + chunk.getX() + "," + chunk.getZ()); + break; case LegacyTerrain: case Data2DLegacy: Fawe.debug("Legacy terrain not supported, please update. " + tag); case BiomeState: case FinalizedState: - case PendingTicks: - case BlockExtraData: case Version: break; }