Merge remote-tracking branch 'origin/1.20' into 1.21.1

This commit is contained in:
embeddedt 2025-04-29 18:28:15 -04:00
commit 2673ae46ae
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
2 changed files with 7 additions and 0 deletions

View File

@ -181,6 +181,7 @@ public class ModernFixEarlyConfig {
.put("mixin.feature.snapshot_easter_egg", true)
.put("mixin.feature.warn_missing_perf_mods", true)
.put("mixin.feature.spark_profile_launch", false)
.put("mixin.feature.log_stdout_in_log_files", true)
.put("mixin.devenv", isDevEnv)
.putConditionally(() -> !isFabric, "mixin.bugfix.fix_config_crashes", true)
.putConditionally(() -> !isFabric, "mixin.feature.registry_event_progress", false)

View File

@ -13,6 +13,7 @@ import net.neoforged.fml.ModLoadingIssue;
import net.neoforged.fml.loading.FMLLoader;
import net.neoforged.fml.loading.FMLPaths;
import net.neoforged.fml.loading.LoadingModList;
import net.neoforged.fml.loading.TracingPrintStream;
import net.neoforged.fml.loading.moddiscovery.ModInfo;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.RegisterCommandsEvent;
@ -25,6 +26,7 @@ import org.embeddedt.modernfix.platform.ModernFixPlatformHooks;
import org.embeddedt.modernfix.spark.SparkLaunchProfiler;
import org.embeddedt.modernfix.util.CommonModUtil;
import org.objectweb.asm.tree.ClassNode;
import org.slf4j.LoggerFactory;
import java.nio.file.Path;
import java.util.Map;
@ -86,6 +88,10 @@ public class ModernFixPlatformHooksImpl implements ModernFixPlatformHooks {
CommonModUtil.runWithoutCrash(() -> SparkLaunchProfiler.start("launch"), "Failed to start profiler");
}
if(ModernFixMixinPlugin.instance.isOptionEnabled("feature.log_stdout_in_log_files.PrintStreamReplacement")) {
System.setOut(new TracingPrintStream(LoggerFactory.getLogger("STDOUT"), System.out));
System.setErr(new TracingPrintStream(LoggerFactory.getLogger("STDERR"), System.err));
}
}
public void applyASMTransformers(String mixinClassName, ClassNode targetClass) {