diff options
author | Alexdoru <57050655+Alexdoru@users.noreply.github.com> | 2024-09-17 05:04:01 +0200 |
---|---|---|
committer | boubou19 <miisterunknown@gmail.com> | 2024-09-17 22:55:46 +0200 |
commit | d869dae9af9f0a6e82274b381d4b784a6f80a267 (patch) | |
tree | 7e88da65221e5ca471f9b120f954cd79753bf3b4 /src/main/java/gregtech/loaders | |
parent | d60ed47ae1a0131ba33e923c452123e427eedc9f (diff) | |
download | GT5-Unofficial-d869dae9af9f0a6e82274b381d4b784a6f80a267.tar.gz GT5-Unofficial-d869dae9af9f0a6e82274b381d4b784a6f80a267.tar.bz2 GT5-Unofficial-d869dae9af9f0a6e82274b381d4b784a6f80a267.zip |
remove reflection from GTCLSCompat
Diffstat (limited to 'src/main/java/gregtech/loaders')
-rw-r--r-- | src/main/java/gregtech/loaders/postload/GTPostLoad.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/gregtech/loaders/postload/GTPostLoad.java b/src/main/java/gregtech/loaders/postload/GTPostLoad.java index ffcd815156..35c4e2d874 100644 --- a/src/main/java/gregtech/loaders/postload/GTPostLoad.java +++ b/src/main/java/gregtech/loaders/postload/GTPostLoad.java @@ -1,5 +1,6 @@ package gregtech.loaders.postload; +import static gregtech.api.enums.Mods.BetterLoadingScreen; import static gregtech.api.enums.Mods.Forestry; import static gregtech.api.enums.Mods.GalacticraftCore; import static gregtech.api.enums.Mods.GalacticraftMars; @@ -13,7 +14,6 @@ import static gregtech.api.util.GTRecipeBuilder.MINUTES; import static gregtech.api.util.GTRecipeBuilder.SECONDS; import static gregtech.api.util.GTRecipeBuilder.TICKS; -import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -416,13 +416,9 @@ public class GTPostLoad { ProgressManager.ProgressBar progressBar = ProgressManager .push("Register materials", replaceVanillaItemsSet.size()); - if (GTValues.cls_enabled) { - try { - GTCLSCompat.doActualRegistrationCLS(progressBar, replaceVanillaItemsSet); - GTCLSCompat.pushToDisplayProgress(); - } catch (InvocationTargetException | IllegalAccessException e) { - GTMod.GT_FML_LOGGER.catching(e); - } + if (BetterLoadingScreen.isModLoaded()) { + GTCLSCompat.doActualRegistrationCLS(progressBar, replaceVanillaItemsSet); + GTCLSCompat.pushToDisplayProgress(); } else { replaceVanillaItemsSet.forEach(m -> { progressBar.step(m.mDefaultLocalName); |