(FMLInitializationEvent aEvent)
| 197 | } |
| 198 | |
| 199 | public void onModInit(FMLInitializationEvent aEvent) { |
| 200 | if (mStartedInit) return; |
| 201 | try { |
| 202 | OUT.println(getModNameForLog() + ": ==================="); |
| 203 | ORD.println(getModNameForLog() + ": ==================="); |
| 204 | |
| 205 | loadRunnables("Before Init", mBeforeInit); mBeforeInit.clear(); mBeforeInit = null; |
| 206 | |
| 207 | OUT.println(getModNameForLog() + ": Init-Phase started!"); |
| 208 | ORD.println(getModNameForLog() + ": Init-Phase started!"); |
| 209 | |
| 210 | mStartedInit = T; |
| 211 | sStartedInit++; |
| 212 | if (mProxy != null) mProxy.onProxyBeforeInit(this, aEvent); |
| 213 | onModInit2(aEvent); |
| 214 | if (mProxy != null) mProxy.onProxyAfterInit(this, aEvent); |
| 215 | sFinishedInit++; |
| 216 | mFinishedInit = T; |
| 217 | |
| 218 | OUT.println(getModNameForLog() + ": Init-Phase finished!"); |
| 219 | ORD.println(getModNameForLog() + ": Init-Phase finished!"); |
| 220 | |
| 221 | if (!mCompatClasses.isEmpty()) { |
| 222 | UT.LoadingBar.start("Loading Compat (Init)", mCompatClasses.size()); |
| 223 | for (ICompat tCompat : mCompatClasses) { |
| 224 | String tString = tCompat.toString(); |
| 225 | UT.LoadingBar.step(UT.Code.stringValid(tString)?tString:"UNNAMED"); |
| 226 | try {tCompat.onLoad(aEvent);} catch(Throwable e) {e.printStackTrace(ERR);} |
| 227 | } |
| 228 | UT.LoadingBar.finish(); |
| 229 | } |
| 230 | |
| 231 | loadRunnables("After Init", mAfterInit); mAfterInit.clear(); mAfterInit = null; |
| 232 | |
| 233 | loadRunnables("Saving Configs", sConfigs); |
| 234 | |
| 235 | if (sFinishedInit >= sModCountUsingGTAPI) for (Abstract_Mod tMod : MODS_USING_GT_API) try {tMod.onModFinalInit(aEvent);} catch(Throwable e) {e.printStackTrace(ERR);} |
| 236 | |
| 237 | OUT.println(getModNameForLog() + ": ===================="); |
| 238 | ORD.println(getModNameForLog() + ": ===================="); |
| 239 | } catch(Throwable e) { |
| 240 | loadRunnables("Saving Configs after Exception!", sConfigs); |
| 241 | e.printStackTrace(ERR); |
| 242 | throw new RuntimeException(e); |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | public void onModPostInit(FMLPostInitializationEvent aEvent) { |
| 247 | if (mStartedPostInit) return; |
no test coverage detected