Skip to content

Commit

Permalink
Fix some problems with the old loader changes
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Oct 29, 2023
1 parent fe03387 commit ec63a63
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
}

base {
archivesName = "fabric-loader"
archivesName = "iris-loader"
}

def ENV = System.getenv()
Expand Down
2 changes: 1 addition & 1 deletion minecraft/minecraft-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ loom {
}
}

def minecraft_version = "1.20.2"
def minecraft_version = "23w43b"

repositories {
mavenCentral()
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/net/fabricmc/loader/api/FabricLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,6 @@ static FabricLoader getInstance() {
* @return the launch arguments for the game
*/
String[] getLaunchArguments(boolean sanitize);

String getRawGameVersion();
}
7 changes: 6 additions & 1 deletion src/main/java/net/fabricmc/loader/impl/FabricLoaderImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Set<ModCandidate>> envDisabledMods = new HashMap<>();
Expand Down Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/legacyJava/net/fabricmc/loader/FabricLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec63a63

Please sign in to comment.