diff --git a/build.gradle b/build.gradle index fd5ac2bd8..70ca97edf 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ plugins { } base { - archivesName = "fabric-loader" + archivesName = "iris-loader" } def ENV = System.getenv() diff --git a/minecraft/minecraft-test/build.gradle b/minecraft/minecraft-test/build.gradle index e9d297b3a..d613bd8c0 100644 --- a/minecraft/minecraft-test/build.gradle +++ b/minecraft/minecraft-test/build.gradle @@ -6,7 +6,7 @@ loom { } } -def minecraft_version = "1.20.2" +def minecraft_version = "23w43b" repositories { mavenCentral() diff --git a/src/main/java/net/fabricmc/loader/api/FabricLoader.java b/src/main/java/net/fabricmc/loader/api/FabricLoader.java index e83b54033..d883ba27c 100644 --- a/src/main/java/net/fabricmc/loader/api/FabricLoader.java +++ b/src/main/java/net/fabricmc/loader/api/FabricLoader.java @@ -236,4 +236,6 @@ static FabricLoader getInstance() { * @return the launch arguments for the game */ String[] getLaunchArguments(boolean sanitize); + + String getRawGameVersion(); } diff --git a/src/main/java/net/fabricmc/loader/impl/FabricLoaderImpl.java b/src/main/java/net/fabricmc/loader/impl/FabricLoaderImpl.java index 7abe5e02a..14e97db40 100644 --- a/src/main/java/net/fabricmc/loader/impl/FabricLoaderImpl.java +++ b/src/main/java/net/fabricmc/loader/impl/FabricLoaderImpl.java @@ -207,7 +207,7 @@ private void setup() throws ModResolutionException { ModDiscoverer discoverer = new ModDiscoverer(versionOverrides, depOverrides); discoverer.addCandidateFinder(new ClasspathModCandidateFinder()); - discoverer.addCandidateFinder(new DirectoryModCandidateFinder(gameDir.resolve("mods"), remapRegularMods)); + discoverer.addCandidateFinder(new DirectoryModCandidateFinder(gameDir.resolve("iris-reserved").resolve(getGameProvider().getRawGameVersion()), remapRegularMods)); discoverer.addCandidateFinder(new ArgumentModCandidateFinder(remapRegularMods)); Map> envDisabledMods = new HashMap<>(); @@ -592,6 +592,11 @@ public String[] getLaunchArguments(boolean sanitize) { return getGameProvider().getLaunchArguments(sanitize); } + @Override + public String getRawGameVersion() { + return getGameProvider().getRawGameVersion(); + } + /** * Provides singleton for static init assignment regardless of load order. */ diff --git a/src/main/legacyJava/net/fabricmc/loader/FabricLoader.java b/src/main/legacyJava/net/fabricmc/loader/FabricLoader.java index 639dff4b6..35fa197c5 100644 --- a/src/main/legacyJava/net/fabricmc/loader/FabricLoader.java +++ b/src/main/legacyJava/net/fabricmc/loader/FabricLoader.java @@ -37,7 +37,7 @@ public abstract class FabricLoader implements net.fabricmc.loader.api.FabricLoad public static final FabricLoader INSTANCE = FabricLoaderImpl.InitHelper.get(); public File getModsDirectory() { - return getGameDir().resolve("mods").toFile(); + return getGameDir().resolve("iris-reserved").resolve(INSTANCE.getRawGameVersion()).toFile(); } @Override