aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig/OneConfig.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/OneConfig.java')
-rw-r--r--src/main/java/io/polyfrost/oneconfig/OneConfig.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/OneConfig.java b/src/main/java/io/polyfrost/oneconfig/OneConfig.java
index 4b916d9..6f58f52 100644
--- a/src/main/java/io/polyfrost/oneconfig/OneConfig.java
+++ b/src/main/java/io/polyfrost/oneconfig/OneConfig.java
@@ -1,13 +1,29 @@
package io.polyfrost.oneconfig;
import io.polyfrost.oneconfig.command.OneConfigCommand;
+import net.minecraft.client.Minecraft;
import net.minecraftforge.client.ClientCommandHandler;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
+import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
+
+import java.io.File;
@Mod(modid = "oneconfig", name = "OneConfig", version = "${version}")
public class OneConfig {
+ private static Minecraft mc = Minecraft.getMinecraft();
+ public static File jarFile;
+ public static File oneConfigDir = new File(mc.mcDataDir, "OneConfig/");
+ public static File themesDir = new File(oneConfigDir, "themes/");
+
+
+ @Mod.EventHandler
+ public void onPreFMLInit(FMLPreInitializationEvent event) {
+ jarFile = event.getSourceFile();
+ oneConfigDir.mkdirs();
+ themesDir.mkdirs();
+ }
@Mod.EventHandler
public void onFMLInitialization(FMLInitializationEvent event) {