Handle Knot behaving differently from FML with getResource
This commit is contained in:
parent
fd68efec0c
commit
f391e97a62
|
|
@ -20,6 +20,7 @@ import org.objectweb.asm.tree.ClassNode;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.BooleanSupplier;
|
import java.util.function.BooleanSupplier;
|
||||||
|
|
@ -235,7 +236,10 @@ public class ModernFixEarlyConfig {
|
||||||
if(!ModernFixPlatformHooks.INSTANCE.isDevEnv())
|
if(!ModernFixPlatformHooks.INSTANCE.isDevEnv())
|
||||||
return;
|
return;
|
||||||
try {
|
try {
|
||||||
if(ModernFixEarlyConfig.class.getClassLoader().getResource("/net/minecraft/world/level/Level.class") == null) {
|
URL deobfClass = isFabric ?
|
||||||
|
ModernFixEarlyConfig.class.getResource("/net/minecraft/world/level/Level.class") :
|
||||||
|
ModernFixEarlyConfig.class.getClassLoader().getResource("/net/minecraft/world/level/Level.class");
|
||||||
|
if(deobfClass == null) {
|
||||||
LOGGER.warn("We are in a non-Mojmap dev environment. Disabling blockstate cache patch");
|
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]");
|
this.options.get("mixin.perf.reduce_blockstate_cache_rebuilds").addModOverride(false, "[not mojmap]");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user