aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/GT_Mod.java
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2024-08-21 18:40:21 +0200
committerGitHub <noreply@github.com>2024-08-21 18:40:21 +0200
commit15208bb959da3d192c6dfa44a4f029544e98ddd8 (patch)
tree6273f3eb4149c7e86c3cee6a775ad2eebad85958 /src/main/java/gregtech/GT_Mod.java
parente6687f29ada12095e896855c4b22f8e0bdb2989f (diff)
downloadGT5-Unofficial-15208bb959da3d192c6dfa44a4f029544e98ddd8.tar.gz
GT5-Unofficial-15208bb959da3d192c6dfa44a4f029544e98ddd8.tar.bz2
GT5-Unofficial-15208bb959da3d192c6dfa44a4f029544e98ddd8.zip
Cleaning up GT5U's post init (#2932)
* wrap MTE ids print into a debug option * remove EnsureToBeLoadedLast config * exit early * spotless apply * making collision checks optional by default --------- Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/GT_Mod.java')
-rw-r--r--src/main/java/gregtech/GT_Mod.java31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index 17d76f564d..1f9180fc16 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -176,6 +176,7 @@ public class GT_Mod implements IGT_Mod {
clientSide = "gregtech.common.GT_Client",
serverSide = "gregtech.common.GT_Server")
public static GT_Proxy gregtechproxy;
+ public static final boolean DEBUG = Boolean.getBoolean("gt.debug");;
public static int MAX_IC2 = 2147483647;
public static GT_Achievements achievements;
@@ -334,11 +335,10 @@ public class GT_Mod implements IGT_Mod {
new GT_Loader_MetaTileEntities_Recipes().run();
- if (gregtechproxy.mSortToTheEnd) {
- new GT_ItemIterator().run();
- gregtechproxy.registerUnificationEntries();
- new GT_FuelLoader().run();
- }
+ new GT_ItemIterator().run();
+ gregtechproxy.registerUnificationEntries();
+ new GT_FuelLoader().run();
+
if (Mods.Waila.isModLoaded()) {
Waila.init();
}
@@ -367,6 +367,7 @@ public class GT_Mod implements IGT_Mod {
return;
}
+ // Seems only used by GGFab so far
for (Runnable tRunnable : GregTech_API.sBeforeGTPostload) {
try {
tRunnable.run();
@@ -377,20 +378,18 @@ public class GT_Mod implements IGT_Mod {
gregtechproxy.onPostLoad();
- final int bound = GregTech_API.METATILEENTITIES.length;
- for (int i1 = 1; i1 < bound; i1++) {
- if (GregTech_API.METATILEENTITIES[i1] != null) {
- GT_Log.out.printf("META %d %s\n", i1, GregTech_API.METATILEENTITIES[i1].getMetaName());
+ if (DEBUG) {
+ // Prints all the used MTE id and their associated TE name, turned on with -Dgt.debug=true in jvm args
+ final int bound = GregTech_API.METATILEENTITIES.length;
+ for (int i1 = 1; i1 < bound; i1++) {
+ if (GregTech_API.METATILEENTITIES[i1] != null) {
+ GT_Log.out.printf("META %d %s\n", i1, GregTech_API.METATILEENTITIES[i1].getMetaName());
+ }
}
}
- if (gregtechproxy.mSortToTheEnd) {
- gregtechproxy.registerUnificationEntries();
- } else {
- new GT_ItemIterator().run();
- gregtechproxy.registerUnificationEntries();
- new GT_FuelLoader().run();
- }
+ gregtechproxy.registerUnificationEntries();
+
new GT_BookAndLootLoader().run();
new GT_ItemMaxStacksizeLoader().run();
new GT_BlockResistanceLoader().run();