File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
common/src/main/java/org/embeddedt/modernfix/core/config Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2020import org .spongepowered .asm .mixin .Mixin ;
2121
2222import java .io .*;
23+ import java .net .URL ;
2324import java .nio .charset .StandardCharsets ;
2425import java .util .*;
2526import java .util .function .BooleanSupplier ;
@@ -235,7 +236,10 @@ private void checkBlockstateCacheRebuilds() {
235236 if (!ModernFixPlatformHooks .INSTANCE .isDevEnv ())
236237 return ;
237238 try {
238- if (ModernFixEarlyConfig .class .getClassLoader ().getResource ("/net/minecraft/world/level/Level.class" ) == null ) {
239+ URL deobfClass = isFabric ?
240+ ModernFixEarlyConfig .class .getResource ("/net/minecraft/world/level/Level.class" ) :
241+ ModernFixEarlyConfig .class .getClassLoader ().getResource ("/net/minecraft/world/level/Level.class" );
242+ if (deobfClass == null ) {
239243 LOGGER .warn ("We are in a non-Mojmap dev environment. Disabling blockstate cache patch" );
240244 this .options .get ("mixin.perf.reduce_blockstate_cache_rebuilds" ).addModOverride (false , "[not mojmap]" );
241245 }
You can’t perform that action at this time.
0 commit comments