MCPcopy Index your code
hub / github.com/GregTech6/gregtech6 / onModPreInit2

Method onModPreInit2

src/main/java/gregapi/GT_API.java:279–758  ·  view source on GitHub ↗
(FMLPreInitializationEvent aEvent)

Source from the content-addressed store, hash-verified

277 @Mod.EventHandler public void onServerStopped (FMLServerStoppedEvent aEvent) {onModServerStopped(aEvent);}
278
279 @Override
280 @SuppressWarnings({ "resource", "deprecation" })
281 public void onModPreInit2(FMLPreInitializationEvent aEvent) {
282 FMLInterModComms.sendRuntimeMessage(MD.GT.mID, "carbonconfig", "remapGui", MD.GAPI.mID);
283
284 File
285 tFile = new File(DirectoriesGT.CONFIG_GT, "IDs.cfg");
286 if (!tFile.exists()) tFile = new File(DirectoriesGT.CONFIG_GT, "ids.cfg");
287 Config.sConfigFileIDs = new Configuration(tFile); Config.sConfigFileIDs.save();
288
289 ConfigsGT.GREGTECH = new Config("GregTech.cfg").setUseDefaultInNames(F);
290 ConfigsGT.RECIPES = new Config("Recipes.cfg");
291 ConfigsGT.WORLDGEN = new Config("WorldGenerationNew.cfg");
292 ConfigsGT.WORLDGEN_GT5 = new Config("old_barely_used_gt5_style_garbage_worldgen.cfg");
293 ConfigsGT.MATERIAL = new Config("Materials.cfg");
294 ConfigsGT.OREPROCESSING = new Config("OreProcessing.cfg");
295 // Deprecated Config Files.
296 ConfigsGT.OVERPOWERED = ConfigsGT.MACHINES = ConfigsGT.SPECIAL = ConfigsGT.GREGTECH;
297
298
299 tFile = new File(DirectoriesGT.CONFIG_GT, "Stacksizes.cfg");
300 if (!tFile.exists()) tFile = new File(DirectoriesGT.CONFIG_GT, "stacksizes.cfg");
301 Configuration tStackConfig = new Configuration(tFile);
302
303 tFile = new File(DirectoriesGT.LOGS, "gregtech.log");
304 if (!tFile.exists()) try {tFile.createNewFile();} catch(Throwable e) {/**/}
305
306 List<String>
307 tList = ((LogBuffer)OUT).mBufferedLog;
308 try {
309 OUT = new PrintStream(tFile);
310 } catch (Throwable e) {
311 OUT = System.out;
312 }
313
314 for (String tString : tList) OUT.println(tString);
315
316 if (ConfigsGT.GREGTECH.get("general", "LoggingErrors", T)) {
317 tList = ((LogBuffer)ERR).mBufferedLog;
318 ERR = OUT;
319 for (String tString : tList) ERR.println(tString);
320 } else {
321 OUT.println("**********************************************************************");
322 OUT.println("* WARNING: ERROR LOGGING HAS BEEN DISABLED FOR THIS LOG FILE *");
323 OUT.println("**********************************************************************");
324 }
325
326 tFile = new File(DirectoriesGT.CONFIG_GT, "materiallist.log");
327 if (!tFile.exists()) {try {tFile.createNewFile();} catch (Throwable e) {/**/}}
328 try {
329 MAT_LOG = new PrintStream(tFile);
330 MAT_LOG.println("**********************************************************************");
331 MAT_LOG.println("* This is the complete List of usable GregTech Materials *");
332 MAT_LOG.println("**********************************************************************");
333 } catch (Throwable e) {/**/}
334
335 tFile = new File(DirectoriesGT.LOGS, "oredict.log");
336 if (!tFile.exists()) {try {tFile.createNewFile();} catch (Throwable e) {/**/}}

Callers

nothing calls this directly

Calls 15

removeMethod · 0.95
makeMethod · 0.95
shapedMethod · 0.95
setUseDefaultInNamesMethod · 0.80
printlnMethod · 0.80
setLocalMethod · 0.80
setConfigStacksizeMethod · 0.80
callConstructorMethod · 0.80
registerMethod · 0.80
addRecipe1Method · 0.80
getFieldContentMethod · 0.80
setFieldContentMethod · 0.80

Tested by

no test coverage detected