From 9996c853f10ea32634baf6060bfad0d37e93fe0a Mon Sep 17 00:00:00 2001 From: shartte Date: Mon, 2 Dec 2024 09:40:50 +0100 Subject: [PATCH] Fix DevLaunch being unable to access the BSL main method for BSL 1.0 and below (#190) --- .../net/neoforged/moddevgradle/internal/LegacyForgeFacade.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/legacy/java/net/neoforged/moddevgradle/internal/LegacyForgeFacade.java b/src/legacy/java/net/neoforged/moddevgradle/internal/LegacyForgeFacade.java index 639e5911..418a8df2 100644 --- a/src/legacy/java/net/neoforged/moddevgradle/internal/LegacyForgeFacade.java +++ b/src/legacy/java/net/neoforged/moddevgradle/internal/LegacyForgeFacade.java @@ -7,5 +7,8 @@ public class LegacyForgeFacade { public static void configureRun(Project project, RunModel run) { // This will explicitly be replaced in RunUtils to make this work for IDEs run.getEnvironment().put("MOD_CLASSES", RunUtils.getGradleModFoldersProvider(project, run.getLoadedMods(), null).getClassesArgument()); + + // Old BSL versions before 2022 (i.e. on 1.18.2) did not export any packages, causing DevLaunch to be unable to access the main method + run.getJvmArguments().addAll("--add-exports", "cpw.mods.bootstraplauncher/cpw.mods.bootstraplauncher=ALL-UNNAMED"); } }