Disable reduce_blockstate_cache_rebuilds if dev env is not Mojmap
This is simpler than implementing remapping Closes #229
This commit is contained in:
parent
fe942c90df
commit
bd1ca9ce94
|
|
@ -229,6 +229,21 @@ public class ModernFixEarlyConfig {
|
||||||
if(isFabric) {
|
if(isFabric) {
|
||||||
disableIfModPresent("mixin.bugfix.packet_leak", "memoryleakfix");
|
disableIfModPresent("mixin.bugfix.packet_leak", "memoryleakfix");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkBlockstateCacheRebuilds();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkBlockstateCacheRebuilds() {
|
||||||
|
if(!ModernFixPlatformHooks.INSTANCE.isDevEnv())
|
||||||
|
return;
|
||||||
|
try {
|
||||||
|
if(ModernFixEarlyConfig.class.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]");
|
||||||
|
}
|
||||||
|
} catch(Throwable e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void disableIfModPresent(String configName, String... ids) {
|
private void disableIfModPresent(String configName, String... ids) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user