diff --git a/loader/src/main/java/net/neoforged/fml/loading/VersionInfo.java b/loader/src/main/java/net/neoforged/fml/loading/VersionInfo.java index fe8eae325..127536017 100644 --- a/loader/src/main/java/net/neoforged/fml/loading/VersionInfo.java +++ b/loader/src/main/java/net/neoforged/fml/loading/VersionInfo.java @@ -12,9 +12,6 @@ public record VersionInfo(String neoForgeVersion, String fmlVersion, String mcVe this((String) arguments.get("neoForgeVersion"), (String) arguments.get("fmlVersion"), (String) arguments.get("mcVersion"), (String) arguments.get("neoFormVersion")); } - public String mcAndNeoForgeVersion() { - return mcVersion + "-"+ neoForgeVersion; - } public String mcAndFmlVersion() { return mcVersion+"-"+ fmlVersion; } diff --git a/loader/src/main/java/net/neoforged/fml/loading/targets/FMLServerLaunchHandler.java b/loader/src/main/java/net/neoforged/fml/loading/targets/FMLServerLaunchHandler.java index 796a1a380..35902b005 100644 --- a/loader/src/main/java/net/neoforged/fml/loading/targets/FMLServerLaunchHandler.java +++ b/loader/src/main/java/net/neoforged/fml/loading/targets/FMLServerLaunchHandler.java @@ -5,7 +5,6 @@ package net.neoforged.fml.loading.targets; -import cpw.mods.modlauncher.api.ILaunchHandlerService; import net.neoforged.fml.loading.LibraryFinder; import net.neoforged.fml.loading.VersionInfo; @@ -14,7 +13,7 @@ import java.util.function.BiPredicate; import java.util.stream.Stream; -public class FMLServerLaunchHandler extends CommonServerLaunchHandler implements ILaunchHandlerService { +public class FMLServerLaunchHandler extends CommonServerLaunchHandler { @Override public String name() { return "fmlserver"; } @Override diff --git a/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeClientLaunchHandler.java b/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeClientLaunchHandler.java index ccd11aaf0..0d8f310bd 100644 --- a/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeClientLaunchHandler.java +++ b/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeClientLaunchHandler.java @@ -17,8 +17,8 @@ public class ForgeClientLaunchHandler extends CommonClientLaunchHandler { @Override protected void processMCStream(VersionInfo versionInfo, Stream.Builder mc, Stream.Builder> mods) { - var forgepatches = LibraryFinder.findPathForMaven("net.neoforged", "neoforge", "", "client", versionInfo.mcAndNeoForgeVersion()); - var forgejar = LibraryFinder.findPathForMaven("net.neoforged", "neoforge", "", "universal", versionInfo.mcAndNeoForgeVersion()); + var forgepatches = LibraryFinder.findPathForMaven("net.neoforged", "neoforge", "", "client", versionInfo.neoForgeVersion()); + var forgejar = LibraryFinder.findPathForMaven("net.neoforged", "neoforge", "", "universal", versionInfo.neoForgeVersion()); mc.add(forgepatches); mods.add(List.of(forgejar)); } diff --git a/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeServerLaunchHandler.java b/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeServerLaunchHandler.java index 72debe508..861ac989a 100644 --- a/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeServerLaunchHandler.java +++ b/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeServerLaunchHandler.java @@ -5,7 +5,6 @@ package net.neoforged.fml.loading.targets; -import cpw.mods.modlauncher.api.ILaunchHandlerService; import net.neoforged.fml.loading.LibraryFinder; import net.neoforged.fml.loading.VersionInfo; @@ -14,13 +13,13 @@ import java.util.function.BiPredicate; import java.util.stream.Stream; -public class ForgeServerLaunchHandler extends CommonServerLaunchHandler implements ILaunchHandlerService { +public class ForgeServerLaunchHandler extends CommonServerLaunchHandler { @Override public String name() { return "forgeserver"; } @Override protected BiPredicate processMCStream(VersionInfo versionInfo, Stream.Builder mc, BiPredicate filter, Stream.Builder> mods) { - var forgepatches = LibraryFinder.findPathForMaven("net.neoforged", "neoforge", "", "server", versionInfo.mcAndNeoForgeVersion()); - var forgejar = LibraryFinder.findPathForMaven("net.neoforged", "neoforge", "", "universal", versionInfo.mcAndNeoForgeVersion()); + var forgepatches = LibraryFinder.findPathForMaven("net.neoforged", "neoforge", "", "server", versionInfo.neoForgeVersion()); + var forgejar = LibraryFinder.findPathForMaven("net.neoforged", "neoforge", "", "universal", versionInfo.neoForgeVersion()); mc.add(forgepatches); mods.add(List.of(forgejar)); return filter; diff --git a/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeUserdevLaunchHandler.java b/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeUserdevLaunchHandler.java index f5d6a7c31..6a6c4ebe7 100644 --- a/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeUserdevLaunchHandler.java +++ b/loader/src/main/java/net/neoforged/fml/loading/targets/ForgeUserdevLaunchHandler.java @@ -14,12 +14,9 @@ public abstract class ForgeUserdevLaunchHandler extends CommonUserdevLaunchHandler { @Override protected void processStreams(String[] classpath, VersionInfo versionInfo, Stream.Builder mc, Stream.Builder> mods) { - var forge = searchJarOnClasspath(classpath, "neoforge-" + versionInfo.mcAndNeoForgeVersion()); + var forge = searchJarOnClasspath(classpath, "neoforge-" + versionInfo.neoForgeVersion()); if (forge.isEmpty()) { - forge = searchJarOnClasspath(classpath, "neoforge-" + versionInfo.neoForgeVersion()); - } - if (forge.isEmpty()) { - throw new RuntimeException("Could not find %s, nor %s jar on classpath".formatted("neoforge-" + versionInfo.mcAndNeoForgeVersion(), "neoforge-" + versionInfo.neoForgeVersion())); + throw new RuntimeException("Could not find %s, nor %s jar on classpath".formatted("neoforge-" + versionInfo.neoForgeVersion(), "neoforge-" + versionInfo.neoForgeVersion())); } mc.add(forge.get()); }