From 2d60606de3fb269a292bc6bc8942accaca65602b Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sat, 3 Jun 2023 17:26:42 +0700 Subject: [PATCH] finally fix default config issue (mabe) i didn't test it but blackilykat found the fix ig --- src/main/java/land/chipmunk/chipmunkmod/ChipmunkMod.java | 2 +- src/main/resources/{assets/chipmunkmod => }/default_config.json | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/main/resources/{assets/chipmunkmod => }/default_config.json (100%) diff --git a/src/main/java/land/chipmunk/chipmunkmod/ChipmunkMod.java b/src/main/java/land/chipmunk/chipmunkmod/ChipmunkMod.java index ab8ee0e..e0cb63f 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/ChipmunkMod.java +++ b/src/main/java/land/chipmunk/chipmunkmod/ChipmunkMod.java @@ -50,7 +50,7 @@ public class ChipmunkMod implements ModInitializer { final File file = CONFIG_FILE; if (!file.exists()) { - InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream("default_config.json"); + InputStream is = ChipmunkMod.class.getClassLoader().getResourceAsStream("default_config.json"); BufferedReader reader = new BufferedReader(new InputStreamReader(is)); final StringBuilder sb = new StringBuilder(); diff --git a/src/main/resources/assets/chipmunkmod/default_config.json b/src/main/resources/default_config.json similarity index 100% rename from src/main/resources/assets/chipmunkmod/default_config.json rename to src/main/resources/default_config.json