aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/Main.java10
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java30
2 files changed, 21 insertions, 19 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/Main.java b/src/main/java/kr/syeyoung/dungeonsguide/Main.java
index 85323acf..4983acba 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/Main.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/Main.java
@@ -80,7 +80,7 @@ public class Main
while (progressBar.getStep() < progressBar.getSteps())
progressBar.step("random-"+progressBar.getStep());
ProgressManager.pop(progressBar);
- } catch (Exception e) {
+ } catch (Throwable e) {
e.printStackTrace();
throwError(new String[]{
@@ -95,14 +95,12 @@ public class Main
}
throwError(new String[]{
- "Can't validate current installation of Dungeons Guide",
+ "Can't authenticate session",
"Steps to fix",
"1. check if other people can't join minecraft servers.",
- "2. restart minecraft launcher",
+ "2. physically click on logout button, then login again",
"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"
+ "If the problem persists after following these steps, please contact developer"
});
}
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 2bdc4206..479762cb 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java
@@ -19,6 +19,7 @@
package kr.syeyoung.dungeonsguide.dungeon.roomfinder;
import com.google.common.io.Files;
+import kr.syeyoung.dungeonsguide.Main;
import kr.syeyoung.dungeonsguide.dungeon.data.DungeonRoomInfo;
import net.minecraft.client.Minecraft;
import org.apache.commons.io.IOUtils;
@@ -106,19 +107,22 @@ public class DungeonRoomInfoRegistry {
registered.clear();
shapeMap.clear();
uuidMap.clear();
- 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("z:///"+name).openStream();
- ObjectInputStream ois = new ObjectInputStream(fis);
- DungeonRoomInfo dri = (DungeonRoomInfo) ois.readObject();
- ois.close();
- fis.close();
- register(dri);
- } catch (Exception e) {e.printStackTrace();}
- }
+ try {
+ List<String> lines = IOUtils.readLines(Main.class.getResourceAsStream("/roomdata/datas.txt"));
+ for (String name : lines) {
+ if (!name.endsWith(".roomdata")) continue;
+ try {
+ InputStream fis = Main.class.getResourceAsStream("/"+name);
+ ObjectInputStream ois = new ObjectInputStream(fis);
+ DungeonRoomInfo dri = (DungeonRoomInfo) ois.readObject();
+ ois.close();
+ fis.close();
+ register(dri);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ } catch (Exception e) {e.printStackTrace();}
for (File f : dir.listFiles()) {
if (!f.getName().endsWith(".roomdata")) continue;
try {