diff options
author | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-12-14 13:00:56 +0900 |
---|---|---|
committer | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-12-14 13:00:56 +0900 |
commit | 1a870dde6063de18728b6f063bc22349a25a7358 (patch) | |
tree | 018bc1500dcd1d10ba8a9074a932f11e10282d24 /src/main/java/kr/syeyoung/dungeonsguide | |
parent | ac7363e998734c6434972e8c68d8629b376b7fbe (diff) | |
download | Skyblock-Dungeons-Guide-1a870dde6063de18728b6f063bc22349a25a7358.tar.gz Skyblock-Dungeons-Guide-1a870dde6063de18728b6f063bc22349a25a7358.tar.bz2 Skyblock-Dungeons-Guide-1a870dde6063de18728b6f063bc22349a25a7358.zip |
PLEASE FIX BUGS
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide')
4 files changed, 63 insertions, 68 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/a.java b/src/main/java/kr/syeyoung/dungeonsguide/a.java index e9ca2388..dbc066fa 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/a.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/a.java @@ -40,71 +40,71 @@ public class a d.init(a); } - @EventHandler - public void a(FMLPreInitializationEvent a) { - b b = new b(); - String c = null; - try { - c = b.b(); - if (c != null) { - this.a = this; - URL.setURLStreamHandlerFactory(new c(b)); - LaunchClassLoader d = (LaunchClassLoader) a.class.getClassLoader(); - d.addURL(new URL("z:///")); - - try { - this.d = new e(b); - this.d.pre(a); - } catch (Exception e) { - e.printStackTrace(); - - a(new String[]{ - "Couldn't load Dungeons Guide", - "Please contact developer if this problem persists after restart" - }); - } - return; - } - } catch (IOException e) { - e.printStackTrace(); - } catch (AuthenticationException e) { - e.printStackTrace(); - } catch (NoSuchAlgorithmException e) { - e.printStackTrace(); - } catch (NoSuchPaddingException e) { - e.printStackTrace(); - } catch (InvalidKeyException e) { - e.printStackTrace(); - } catch (InvalidAlgorithmParameterException e) { - e.printStackTrace(); - } catch (IllegalBlockSizeException e) { - e.printStackTrace(); - } catch (BadPaddingException e) { - e.printStackTrace(); - } - - a(new String[]{ - "Can't validate current installation of Dungeons Guide", - "Steps to fix", - "1. check if other people can't join minecraft servers. If they can't it's impossible to validate", - "2. restart minecraft launcher", - "3. make sure you're on the right account", - "4. restart your computer", - "If the problem persists after following these steps, please contact developer", - "If you haven't purchased the mod, please consider doing so" - }); - } // @EventHandler -// public void pre(FMLPreInitializationEvent event) { -// dungeonsGuideMain = this; -// URL.setURLStreamHandlerFactory(new DGURLStreamHandlerFactory(null)); +// public void a(FMLPreInitializationEvent a) { +// b b = new b(); +// String c = null; +// try { +// c = b.b(); +// if (c != null) { +// this.a = this; +// URL.setURLStreamHandlerFactory(new c(b)); +// LaunchClassLoader d = (LaunchClassLoader) a.class.getClassLoader(); +// d.addURL(new URL("z:///")); +// // try { -// dungeonsGuideInterface = new DungeonsGuide(null); -// dungeonsGuideInterface.pre(event); +// this.d = new e(b); +// this.d.pre(a); // } catch (Exception e) { // e.printStackTrace(); +// +// a(new String[]{ +// "Couldn't load Dungeons Guide", +// "Please contact developer if this problem persists after restart" +// }); // } +// return; +// } +// } catch (IOException e) { +// e.printStackTrace(); +// } catch (AuthenticationException e) { +// e.printStackTrace(); +// } catch (NoSuchAlgorithmException e) { +// e.printStackTrace(); +// } catch (NoSuchPaddingException e) { +// e.printStackTrace(); +// } catch (InvalidKeyException e) { +// e.printStackTrace(); +// } catch (InvalidAlgorithmParameterException e) { +// e.printStackTrace(); +// } catch (IllegalBlockSizeException e) { +// e.printStackTrace(); +// } catch (BadPaddingException e) { +// e.printStackTrace(); +// } +// +// a(new String[]{ +// "Can't validate current installation of Dungeons Guide", +// "Steps to fix", +// "1. check if other people can't join minecraft servers. If they can't it's impossible to validate", +// "2. restart minecraft launcher", +// "3. make sure you're on the right account", +// "4. restart your computer", +// "If the problem persists after following these steps, please contact developer", +// "If you haven't purchased the mod, please consider doing so" +// }); // } + @EventHandler + public void pre(FMLPreInitializationEvent event) { + a = this; + URL.setURLStreamHandlerFactory(new c(null)); + try { + d = new e(null); + d.pre(event); + } catch (Exception e) { + e.printStackTrace(); + } + } public void a(final String[] a) { final GuiScreen b = new GuiErrorScreen(null, null) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/d/a.java b/src/main/java/kr/syeyoung/dungeonsguide/d/a.java index 9cc4932c..58c89ba8 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/d/a.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/d/a.java @@ -23,8 +23,9 @@ public class a extends URLConnection { String path = url.getPath().substring(1); if (!a.d().containsKey(path)) throw new FileNotFoundException(); return new ByteArrayInputStream(a.d().get(path)); - } else { + } else if (url.getPath().contains("roomdata")){ return a.class.getResourceAsStream(url.getPath()); } + throw new FileNotFoundException(); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java index 2c5e7978..2bf62add 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java @@ -67,12 +67,12 @@ public class DungeonRoomInfoRegistry { registered.clear(); shapeMap.clear(); uuidMap.clear(); - URL url = new URL("dungeonsguide:///roomdata/datas.txt"); + URL url = new URL("z:///roomdata/datas.txt"); List<String> lines = IOUtils.readLines(url.openConnection().getInputStream()); for (String name : lines) { if (!name.endsWith(".roomdata")) continue; try { - InputStream fis = new URL("dungeonsguide:///"+name).openStream(); + InputStream fis = new URL("z:///"+name).openStream(); ObjectInputStream ois = new ObjectInputStream(fis); DungeonRoomInfo dri = (DungeonRoomInfo) ois.readObject(); ois.close(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java index 99280053..b2059884 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java @@ -60,11 +60,6 @@ public class RoomProcessorWaterPuzzle extends GeneralRoomProcessor { @Override public void drawScreen(float partialTicks) { super.drawScreen(partialTicks); - if (!argumentsFulfilled) return; - FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; - if (waterBoard == null) return; - fr.drawString("To Open: "+waterBoard.getReqOpen(),0,160, 0xFFFFFF); - fr.drawString("Target: "+waterBoard.getTarget2(),0,180, 0xFFFFFF); } @Override @@ -92,7 +87,6 @@ public class RoomProcessorWaterPuzzle extends GeneralRoomProcessor { RenderUtils.highlightBlock(target, new Color(0,255,255,255), partialTicks); RenderUtils.highlightBlock(waterBoard.getToggleableMap().get("mainStream").getBlockPos(), new Color(0,255,0,255), partialTicks); } -// RenderUtils.highlightBlock(waterBoard.get); } public static class Generator implements RoomProcessorGenerator<RoomProcessorWaterPuzzle> { |