diff options
11 files changed, 33 insertions, 3 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java b/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java index 7936fbe3..8fe7f793 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java @@ -16,8 +16,9 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import org.apache.commons.io.IOUtils; -import java.io.File; +import java.io.*; @Mod(modid = DungeonsGuide.MODID, version = DungeonsGuide.VERSION) public class DungeonsGuide @@ -50,18 +51,47 @@ public class DungeonsGuide ClientCommandHandler.instance.registerCommand(new CommandToggleDebug()); //noinspection ResultOfMethodCallIgnored - configDir.mkdirs(); + if (!configDir.exists()) { + configDir.mkdirs(); + String[] files = { + "990f6e4c-f7cf-4d27-ae91-11219b85861f.roomdata", + "5000be9d-3081-4a5e-8563-dd826705663a.roomdata", + "9139cb1c-b6f3-4bac-92de-909b1eb73449.roomdata", + "11982f7f-703e-4d98-9d27-4e07ba3fef71.roomdata", + "a053f4fa-d6b2-4aef-ae3e-97c7eee0252e.roomdata", + "c2ea0a41-d495-437f-86cc-235a71c49f22.roomdata", + "cf6d49d3-4f1e-4ec9-836e-049573793ddd.roomdata", + "cf44c95c-950e-49e0-aa4c-82c2b18d0acc.roomdata", + "d3e61abf-4198-4520-a950-a03761a0eb6f.roomdata", + "ffd5411b-6ff4-4f60-b387-72f00510ec50.roomdata" + }; + for (String str:files) { + try { + copy(DungeonsGuide.class.getResourceAsStream("/roomdata/"+str), new File(configDir, str)); + } catch (IOException e) { + e.printStackTrace(); + } + } + } DungeonRoomInfoRegistry.loadAll(configDir); Keybinds.register(); } + private void copy(InputStream inputStream, File f) throws IOException { + FileOutputStream fos = new FileOutputStream(f); + IOUtils.copy(inputStream, fos); + fos.flush(); + fos.close(); + inputStream.close(); + } + @Getter private File configDir; @EventHandler public void pre(FMLPreInitializationEvent event) { - configDir = new File(event.getModConfigurationDirectory(),"pog"); + configDir = new File(event.getModConfigurationDirectory(),"dungeonsguide"); } public SkyblockStatus getSkyblockStatus() { diff --git a/src/main/resources/roomdata/11982f7f-703e-4d98-9d27-4e07ba3fef71.roomdata b/src/main/resources/roomdata/11982f7f-703e-4d98-9d27-4e07ba3fef71.roomdata Binary files differnew file mode 100644 index 00000000..4b1e87d7 --- /dev/null +++ b/src/main/resources/roomdata/11982f7f-703e-4d98-9d27-4e07ba3fef71.roomdata diff --git a/src/main/resources/roomdata/5000be9d-3081-4a5e-8563-dd826705663a.roomdata b/src/main/resources/roomdata/5000be9d-3081-4a5e-8563-dd826705663a.roomdata Binary files differnew file mode 100644 index 00000000..57dd6ee5 --- /dev/null +++ b/src/main/resources/roomdata/5000be9d-3081-4a5e-8563-dd826705663a.roomdata diff --git a/src/main/resources/roomdata/9139cb1c-b6f3-4bac-92de-909b1eb73449.roomdata b/src/main/resources/roomdata/9139cb1c-b6f3-4bac-92de-909b1eb73449.roomdata Binary files differnew file mode 100644 index 00000000..c9a51fb4 --- /dev/null +++ b/src/main/resources/roomdata/9139cb1c-b6f3-4bac-92de-909b1eb73449.roomdata diff --git a/src/main/resources/roomdata/990f6e4c-f7cf-4d27-ae91-11219b85861f.roomdata b/src/main/resources/roomdata/990f6e4c-f7cf-4d27-ae91-11219b85861f.roomdata Binary files differnew file mode 100644 index 00000000..3e1aab30 --- /dev/null +++ b/src/main/resources/roomdata/990f6e4c-f7cf-4d27-ae91-11219b85861f.roomdata diff --git a/src/main/resources/roomdata/a053f4fa-d6b2-4aef-ae3e-97c7eee0252e.roomdata b/src/main/resources/roomdata/a053f4fa-d6b2-4aef-ae3e-97c7eee0252e.roomdata Binary files differnew file mode 100644 index 00000000..a3eb8baa --- /dev/null +++ b/src/main/resources/roomdata/a053f4fa-d6b2-4aef-ae3e-97c7eee0252e.roomdata diff --git a/src/main/resources/roomdata/c2ea0a41-d495-437f-86cc-235a71c49f22.roomdata b/src/main/resources/roomdata/c2ea0a41-d495-437f-86cc-235a71c49f22.roomdata Binary files differnew file mode 100644 index 00000000..e3922fac --- /dev/null +++ b/src/main/resources/roomdata/c2ea0a41-d495-437f-86cc-235a71c49f22.roomdata diff --git a/src/main/resources/roomdata/cf44c95c-950e-49e0-aa4c-82c2b18d0acc.roomdata b/src/main/resources/roomdata/cf44c95c-950e-49e0-aa4c-82c2b18d0acc.roomdata Binary files differnew file mode 100644 index 00000000..079649bc --- /dev/null +++ b/src/main/resources/roomdata/cf44c95c-950e-49e0-aa4c-82c2b18d0acc.roomdata diff --git a/src/main/resources/roomdata/cf6d49d3-4f1e-4ec9-836e-049573793ddd.roomdata b/src/main/resources/roomdata/cf6d49d3-4f1e-4ec9-836e-049573793ddd.roomdata Binary files differnew file mode 100644 index 00000000..544f9ae4 --- /dev/null +++ b/src/main/resources/roomdata/cf6d49d3-4f1e-4ec9-836e-049573793ddd.roomdata diff --git a/src/main/resources/roomdata/d3e61abf-4198-4520-a950-a03761a0eb6f.roomdata b/src/main/resources/roomdata/d3e61abf-4198-4520-a950-a03761a0eb6f.roomdata Binary files differnew file mode 100644 index 00000000..a134b720 --- /dev/null +++ b/src/main/resources/roomdata/d3e61abf-4198-4520-a950-a03761a0eb6f.roomdata diff --git a/src/main/resources/roomdata/ffd5411b-6ff4-4f60-b387-72f00510ec50.roomdata b/src/main/resources/roomdata/ffd5411b-6ff4-4f60-b387-72f00510ec50.roomdata Binary files differnew file mode 100644 index 00000000..87a22f9a --- /dev/null +++ b/src/main/resources/roomdata/ffd5411b-6ff4-4f60-b387-72f00510ec50.roomdata |