11package com .krazzzzymonkey .catalyst ;
22
3- import com .google .gson .JsonElement ;
4- import com .google .gson .JsonParser ;
53import com .krazzzzymonkey .catalyst .configuration .Config ;
64import com .krazzzzymonkey .catalyst .configuration .ConfigurationLoader ;
75import com .krazzzzymonkey .catalyst .events .ClientEvents ;
119import com .krazzzzymonkey .catalyst .managers .accountManager .AccountManager ;
1210import com .krazzzzymonkey .catalyst .managers .accountManager .Standards ;
1311import com .krazzzzymonkey .catalyst .managers .accountManager .config .ConfigValues ;
14- import com .krazzzzymonkey .catalyst .utils .AssetUtils ;
15- import com .krazzzzymonkey .catalyst .managers .TimerManager ;
1612import com .krazzzzymonkey .catalyst .utils .font .CFontRenderer ;
1713import com .krazzzzymonkey .catalyst .utils .visual .ColorUtils ;
1814import net .minecraftforge .common .MinecraftForge ;
3026import org .lwjgl .opengl .Display ;
3127
3228import java .awt .*;
33- import java .io .*;
29+ import java .io .File ;
30+ import java .io .IOException ;
3431
3532import static com .krazzzzymonkey .catalyst .managers .FileManager .CATALYST_DIR ;
3633
@@ -53,8 +50,6 @@ public static void syncConfig() {
5350 public static final String VERSION = "@version@" ;
5451 public static int initCount = 0 ;
5552 public static ModuleManager moduleManager ;
56- public static FileManager fileManager ;
57- public static Thread assetThread ;
5853 public static FontManager fontManager ;
5954
6055 public static CFontRenderer fontRenderer ;
@@ -78,7 +73,6 @@ public static void syncConfig() {
7873 public void preInit (FMLPreInitializationEvent E ) throws IOException {
7974
8075
81- assetThread = new AssetUtils ().getThread ();
8276 logger .info (" ____ _ _ _ ____ _ _ _ " );
8377 logger .info (" / ___|__ _| |_ __ _| |_ _ ___| |_ / ___| (_) ___ _ __ | |_ " );
8478 logger .info (" | | / _` | __/ _` | | | | / __| __| | | | | |/ _ \\ '_ \\ | __|" );
@@ -120,38 +114,28 @@ public void preInit(FMLPreInitializationEvent E) throws IOException {
120114 altConfig = new Configuration (E .getSuggestedConfigurationFile ());
121115 altConfig .load ();
122116 syncConfig ();
123- if (!E .getModMetadata ().version .equals ("${version}" ))//Dev environment needs to use a local list, to avoid issues
124- Standards .updateFolder ();
125- else
126- logger .info ("Dev environment detected!" );
127117 }
128118
129119 @ Mod .EventHandler
130120 public void init (FMLInitializationEvent E ) throws IOException {
131- try {
132- assetThread .join ();
133- } catch (InterruptedException e ) {
134- e .printStackTrace ();
135- }
136121 if (initCount > 0 ) {
137122 return ;
138123 }
139124 Standards .importAccounts ();
140125 TimerManager .INSTANCE = new TimerManager ();
141126 moduleManager = new ModuleManager ();
127+ FileManager .init ();
142128 luaManager = new LuaManager ();
143- fileManager = new FileManager ();
144129 fontRenderer = new CFontRenderer (new Font (FontManager .font , Font .PLAIN , 20 ), true , true );
145130 smallFontRenderer = new CFontRenderer (new Font (FontManager .font , Font .PLAIN , 15 ), true , true );
146131 AccountManager .init ();
147132
148-
149133 initCount ++;
150134 }
151135
152136 @ EventHandler
153137 public void postInit (FMLPostInitializationEvent E ){
154- File file = new File ( System . getProperty ( "user.home" ) + File . separator + "Catalyst" + File . separator + "assets" + File . separator + "gui" + File .separator + "watermark.png" );
138+ File file = FileManager . getAssetFile ( "gui" + File .separator + "watermark.png" );
155139
156140 Display .setTitle (NAME + " " + VERSION );
157141
0 commit comments