From 9d37bb1c9b53214f4f1fe8a4e918d722499f2379 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Tue, 24 Oct 2023 01:43:36 +0800 Subject: [PATCH] Add directly to settings.getEnvironmentVariables() --- .../configuration/providers/forge/ForgeRunTemplate.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/fabricmc/loom/configuration/providers/forge/ForgeRunTemplate.java b/src/main/java/net/fabricmc/loom/configuration/providers/forge/ForgeRunTemplate.java index b1d4f985f8..cf068cbfa5 100644 --- a/src/main/java/net/fabricmc/loom/configuration/providers/forge/ForgeRunTemplate.java +++ b/src/main/java/net/fabricmc/loom/configuration/providers/forge/ForgeRunTemplate.java @@ -58,13 +58,13 @@ public void applyTo(RunConfigSettings settings, ConfigValue.Resolver configValue settings.vmArgs(CollectionUtil.map(jvmArgs, value -> value.resolve(configValueResolver))); - // Add MOD_CLASSES, this is something that ForgeGradle does - env.computeIfAbsent("MOD_CLASSES", $ -> ConfigValue.of("{source_roots}")); - env.forEach((key, value) -> { String resolved = value.resolve(configValueResolver); settings.getEnvironmentVariables().putIfAbsent(key, resolved); }); + + // Add MOD_CLASSES, this is something that ForgeGradle does + settings.getEnvironmentVariables().computeIfAbsent("MOD_CLASSES", $ -> ConfigValue.of("{source_roots}").resolve(configValueResolver)); } public static ForgeRunTemplate fromJson(JsonObject json) {