Skip to content

Commit

Permalink
remove unnecessary mkdirs of old W-OVERFLOW config folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Nov 24, 2023
1 parent a6aee8e commit 378b53f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
13 changes: 0 additions & 13 deletions src/main/java/org/polyfrost/glintcolorizer/GlintColorizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,20 @@

import cc.polyfrost.oneconfig.utils.commands.CommandManager;
import org.polyfrost.glintcolorizer.config.GlintConfig;
import java.io.File;

//#if MODERN==0
import net.minecraftforge.fml.common.Mod;
import org.polyfrost.glintcolorizer.command.GlintCommand;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
//#endif

//#if MODERN==0
@Mod(modid = GlintColorizer.ID, name = GlintColorizer.NAME, version = GlintColorizer.VER)
//#endif
public class GlintColorizer {
public static final String NAME = "@NAME@", VER = "@VER@", ID = "@ID@";
public static File modDir = new File(new File("./W-OVERFLOW"), NAME);
public static GlintConfig config;

//#if MODERN==0
@Mod.EventHandler
public void onPreInit(FMLPreInitializationEvent event)
//#else
//$$ public void onPreInit()
//#endif
{
if (!modDir.exists()) modDir.mkdirs();
}

//#if MODERN==0
@Mod.EventHandler
public void onInit(FMLInitializationEvent event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
package org.polyfrost.glintcolorizer.config;

import cc.polyfrost.oneconfig.config.Config;
import cc.polyfrost.oneconfig.config.annotations.Button;
import cc.polyfrost.oneconfig.config.annotations.Color;
import cc.polyfrost.oneconfig.config.annotations.Dropdown;
import cc.polyfrost.oneconfig.config.annotations.Switch;
import cc.polyfrost.oneconfig.config.annotations.*;
import cc.polyfrost.oneconfig.config.core.OneColor;
import cc.polyfrost.oneconfig.config.data.Mod;
import cc.polyfrost.oneconfig.config.data.ModType;
Expand Down Expand Up @@ -44,8 +41,10 @@ public class GlintConfig extends Config {
GlintColorizer.config.openGui();
});

@Exclude private static final File oldModDir = new File(new File("./W-OVERFLOW"), GlintColorizer.NAME);

public GlintConfig() {
super(new Mod(GlintColorizer.NAME, ModType.UTIL_QOL, "/glintcolorizer_dark.svg", new VigilanceMigrator(new File(GlintColorizer.modDir, GlintColorizer.ID + ".toml").getPath())), GlintColorizer.ID + ".json");
super(new Mod(GlintColorizer.NAME, ModType.UTIL_QOL, "/glintcolorizer_dark.svg", new VigilanceMigrator(new File(oldModDir, GlintColorizer.ID + ".toml").getPath())), GlintColorizer.ID + ".json");
initialize();

addDependency("potionGlintType", "potionGlint");
Expand Down

0 comments on commit 378b53f

Please sign in to comment.