aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-03-26 21:16:33 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-03-26 21:16:33 +0100
commit86bad256905c05b07ad48fe5d29a9110eab60d03 (patch)
treeb25753816a3c5fb9d6951f894182f00344820c2e /src/main/java/at/hannibal2
parentbdf21ff5846b0c608909bd9496fe7a601c3496a5 (diff)
parentc41274af219e124a8af87786f3eb5442ee1bea65 (diff)
downloadskyhanni-86bad256905c05b07ad48fe5d29a9110eab60d03.tar.gz
skyhanni-86bad256905c05b07ad48fe5d29a9110eab60d03.tar.bz2
skyhanni-86bad256905c05b07ad48fe5d29a9110eab60d03.zip
Merge remote-tracking branch 'origin/beta' into beta
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt
index 27ceb7181..97f9196f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt
@@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.events.LorenzEvent
import at.hannibal2.skyhanni.events.PreInitFinishedEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.utils.ConditionalUtils.afterChange
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.StringUtils.matches
import net.minecraft.launchwrapper.Launch
import net.minecraftforge.fml.common.FMLCommonHandler
@@ -57,6 +58,8 @@ object RepoPatternManager {
}
}
+ val localLoading: Boolean get() = config.forceLocal.get() || LorenzUtils.isInDevEnviromen()
+
/**
* Crash if in a development environment, or if inside a guarded event handler.
*/
@@ -98,7 +101,7 @@ object RepoPatternManager {
*/
private fun reloadPatterns() {
val remotePatterns =
- if (config.forceLocal.get()) mapOf()
+ if (localLoading) mapOf()
else regexes?.regexes ?: mapOf()
for (it in usedKeys.values) {