MCPcopy Create free account
hub / github.com/GregTech6/gregtech6 / onModPostInit

Method onModPostInit

src/main/java/gregapi/api/Abstract_Mod.java:246–300  ·  view source on GitHub ↗
(FMLPostInitializationEvent aEvent)

Source from the content-addressed store, hash-verified

244 }
245
246 public void onModPostInit(FMLPostInitializationEvent aEvent) {
247 if (mStartedPostInit) return;
248 try {
249 OUT.println(getModNameForLog() + ": =======================");
250 ORD.println(getModNameForLog() + ": =======================");
251
252 loadRunnables("Before PostInit", mBeforePostInit); mBeforePostInit.clear(); mBeforePostInit = null;
253
254 OUT.println(getModNameForLog() + ": PostInit-Phase started!");
255 ORD.println(getModNameForLog() + ": PostInit-Phase started!");
256
257 mStartedPostInit = T;
258 sStartedPostInit++;
259 if (mProxy != null) mProxy.onProxyBeforePostInit(this, aEvent);
260 onModPostInit2(aEvent);
261 if (mProxy != null) mProxy.onProxyAfterPostInit(this, aEvent);
262 sFinishedPostInit++;
263 mFinishedPostInit = T;
264
265 OUT.println(getModNameForLog() + ": PostInit-Phase finished!");
266 ORD.println(getModNameForLog() + ": PostInit-Phase finished!");
267
268 if (!mCompatClasses.isEmpty()) {
269 UT.LoadingBar.start("Loading Compat (PostInit)", mCompatClasses.size());
270 for (ICompat tCompat : mCompatClasses) {
271 String tString = tCompat.toString();
272 UT.LoadingBar.step(UT.Code.stringValid(tString)?tString:"UNNAMED");
273 try {tCompat.onPostLoad(aEvent);} catch(Throwable e) {e.printStackTrace(ERR);}
274 }
275 UT.LoadingBar.finish();
276 }
277
278 loadRunnables("After PostInit", mAfterPostInit); mAfterPostInit.clear(); mAfterPostInit = null;
279
280 loadRunnables("Finalize", mFinalize); mFinalize.clear(); mFinalize = null;
281
282 if (sFinishedPostInit >= sModCountUsingGTAPI) for (Abstract_Mod tMod : MODS_USING_GT_API) try {tMod.onModFinalPostInit(aEvent);} catch(Throwable e) {e.printStackTrace(ERR);}
283
284 sFinalized++;
285 mFinalized = T;
286
287 if (sFinalized >= sModCountUsingGTAPI) {
288 CR.stopBuffering();
289 }
290
291 loadRunnables("Saving Configs", sConfigs);
292
293 OUT.println(getModNameForLog() + ": ========================");
294 ORD.println(getModNameForLog() + ": ========================");
295 } catch(Throwable e) {
296 loadRunnables("Saving Configs after Exception!", sConfigs);
297 e.printStackTrace(ERR);
298 throw new RuntimeException(e);
299 }
300 }
301
302 public void onModServerStarting(FMLServerStartingEvent aEvent) {
303 loadRunnables(mBeforeServerStarting);

Callers 4

onPostLoadMethod · 0.80
onPostLoadMethod · 0.80
onPostLoadMethod · 0.80
onPostLoadMethod · 0.80

Calls 15

getModNameForLogMethod · 0.95
loadRunnablesMethod · 0.95
onModPostInit2Method · 0.95
stopBufferingMethod · 0.95
printlnMethod · 0.80
onProxyBeforePostInitMethod · 0.80
startMethod · 0.80
stepMethod · 0.80
stringValidMethod · 0.80
finishMethod · 0.80
onModFinalPostInitMethod · 0.80
onPostLoadMethod · 0.65

Tested by

no test coverage detected