From 20bb65b2584e08655a9a8028d2cc06ff73653f81 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Tue, 24 Oct 2023 01:17:34 +0800 Subject: [PATCH] Support newer versions of MinecraftForge 1.20.2. --- .../loom/configuration/providers/forge/ForgeRunTemplate.java | 3 +++ .../providers/forge/MinecraftPatchedProvider.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 4b95c712e4..b1d4f985f8 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,6 +58,9 @@ 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); diff --git a/src/main/java/net/fabricmc/loom/configuration/providers/forge/MinecraftPatchedProvider.java b/src/main/java/net/fabricmc/loom/configuration/providers/forge/MinecraftPatchedProvider.java index 02cc5803b3..98d3fa6525 100644 --- a/src/main/java/net/fabricmc/loom/configuration/providers/forge/MinecraftPatchedProvider.java +++ b/src/main/java/net/fabricmc/loom/configuration/providers/forge/MinecraftPatchedProvider.java @@ -143,7 +143,7 @@ private void initPatchedFiles() { minecraftPatchedSrgJar = forgeWorkingDir.resolve("minecraft-" + type.id + "-srg-patched.jar"); minecraftPatchedSrgAtJar = forgeWorkingDir.resolve("minecraft-" + type.id + "-srg-at-patched.jar"); minecraftPatchedJar = forgeWorkingDir.resolve("minecraft-" + type.id + "-patched.jar"); - minecraftClientExtra = forgeWorkingDir.resolve("forge-client-extra.jar"); + minecraftClientExtra = forgeWorkingDir.resolve("client-extra.jar"); } private void cleanAllCache() throws IOException {