File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
common/src/main/java/org/embeddedt/modernfix/core/config Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,21 @@ private ModernFixEarlyConfig(File file) {
229229 if (isFabric ) {
230230 disableIfModPresent ("mixin.bugfix.packet_leak" , "memoryleakfix" );
231231 }
232+
233+ checkBlockstateCacheRebuilds ();
234+ }
235+
236+ private void checkBlockstateCacheRebuilds () {
237+ if (!ModernFixPlatformHooks .INSTANCE .isDevEnv ())
238+ return ;
239+ try {
240+ if (ModernFixEarlyConfig .class .getResource ("/net/minecraft/world/level/Level.class" ) == null ) {
241+ LOGGER .warn ("We are in a non-Mojmap dev environment. Disabling blockstate cache patch" );
242+ this .options .get ("mixin.perf.reduce_blockstate_cache_rebuilds" ).addModOverride (false , "[not mojmap]" );
243+ }
244+ } catch (Throwable e ) {
245+ e .printStackTrace ();
246+ }
232247 }
233248
234249 private void disableIfModPresent (String configName , String ... ids ) {
You can’t perform that action at this time.
0 commit comments