From b943dc1449ad3d00ea89f214abb9948945dbfa81 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Wed, 25 Oct 2023 14:22:20 -0400 Subject: [PATCH] Fix deobfuscation check not working on Forge 1.18+ --- .../embeddedt/modernfix/core/config/ModernFixEarlyConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/org/embeddedt/modernfix/core/config/ModernFixEarlyConfig.java b/common/src/main/java/org/embeddedt/modernfix/core/config/ModernFixEarlyConfig.java index 36fca525..b8884fd1 100644 --- a/common/src/main/java/org/embeddedt/modernfix/core/config/ModernFixEarlyConfig.java +++ b/common/src/main/java/org/embeddedt/modernfix/core/config/ModernFixEarlyConfig.java @@ -235,7 +235,7 @@ public class ModernFixEarlyConfig { if(!ModernFixPlatformHooks.INSTANCE.isDevEnv()) return; try { - if(ModernFixEarlyConfig.class.getResource("/net/minecraft/world/level/Level.class") == null) { + if(ModernFixEarlyConfig.class.getClassLoader().getResource("/net/minecraft/world/level/Level.class") == null) { LOGGER.warn("We are in a non-Mojmap dev environment. Disabling blockstate cache patch"); this.options.get("mixin.perf.reduce_blockstate_cache_rebuilds").addModOverride(false, "[not mojmap]"); }