aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/loaders
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/loaders
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/loaders')
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_PreLoad.java50
1 files changed, 23 insertions, 27 deletions
diff --git a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
index d1700da3ea..26d75c7933 100644
--- a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
+++ b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
@@ -56,33 +56,31 @@ import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom;
public class GT_PreLoad {
public static void sortToTheEnd() {
- if (GT_Mod.gregtechproxy.mSortToTheEnd) {
- try {
- GT_FML_LOGGER.info("GT_Mod: Sorting GregTech to the end of the Mod List for further processing.");
- LoadController tLoadController = (LoadController) GT_Utility
- .getFieldContent(Loader.instance(), "modController", true, true);
- assert tLoadController != null;
- List<ModContainer> tModList = tLoadController.getActiveModList();
- List<ModContainer> tNewModsList = new ArrayList<>();
- ModContainer tGregTech = null;
- short tModList_sS = (short) tModList.size();
- for (short i = 0; i < tModList_sS; i = (short) (i + 1)) {
- ModContainer tMod = tModList.get(i);
- if (tMod.getModId()
- .equalsIgnoreCase(GregTech.ID)) {
- tGregTech = tMod;
- } else {
- tNewModsList.add(tMod);
- }
- }
- if (tGregTech != null) {
- tNewModsList.add(tGregTech);
+ try {
+ GT_FML_LOGGER.info("GT_Mod: Sorting GregTech to the end of the Mod List for further processing.");
+ LoadController tLoadController = (LoadController) GT_Utility
+ .getFieldContent(Loader.instance(), "modController", true, true);
+ assert tLoadController != null;
+ List<ModContainer> tModList = tLoadController.getActiveModList();
+ List<ModContainer> tNewModsList = new ArrayList<>();
+ ModContainer tGregTech = null;
+ short tModList_sS = (short) tModList.size();
+ for (short i = 0; i < tModList_sS; i = (short) (i + 1)) {
+ ModContainer tMod = tModList.get(i);
+ if (tMod.getModId()
+ .equalsIgnoreCase(GregTech.ID)) {
+ tGregTech = tMod;
+ } else {
+ tNewModsList.add(tMod);
}
- Objects.requireNonNull(GT_Utility.getField(tLoadController, "activeModList", true, true))
- .set(tLoadController, tNewModsList);
- } catch (Throwable e) {
- GT_Mod.logStackTrace(e);
}
+ if (tGregTech != null) {
+ tNewModsList.add(tGregTech);
+ }
+ Objects.requireNonNull(GT_Utility.getField(tLoadController, "activeModList", true, true))
+ .set(tLoadController, tNewModsList);
+ } catch (Throwable e) {
+ GT_Mod.logStackTrace(e);
}
}
@@ -521,8 +519,6 @@ public class GT_PreLoad {
GT_Mod.gregtechproxy.mNerfedVanillaTools = tMainConfig
.get(GT_Mod.aTextGeneral, "smallerVanillaToolDurability", true)
.getBoolean(true);
- GT_Mod.gregtechproxy.mSortToTheEnd = tMainConfig.get(GT_Mod.aTextGeneral, "EnsureToBeLoadedLast", true)
- .getBoolean(true);
GT_Mod.gregtechproxy.mAchievements = tMainConfig.get(GT_Mod.aTextGeneral, "EnableAchievements", true)
.getBoolean(true);
GT_Mod.gregtechproxy.mHideUnusedOres = tMainConfig.get(GT_Mod.aTextGeneral, "HideUnusedOres", true)