Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Add local mod list config
Browse files Browse the repository at this point in the history
  • Loading branch information
ustc-zzzz committed Jul 28, 2021
1 parent 0e5366e commit 0ae3430
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
id 'signing'
}

version = '0.1.3'
version = '0.1.4'
group = 'org.teacon'
archivesBaseName = 'RemoteSync-FML'

Expand Down Expand Up @@ -145,4 +145,4 @@ task("githubActionOutput") {
println "::set-output name=artifact_path::${shadowJar.archiveFile.get().asFile.absolutePath}"
println "::set-output name=artifact_name::${shadowJar.archiveFileName.get()}"
}
}
}
4 changes: 4 additions & 0 deletions src/main/java/org/teacon/sync/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public final class Config {
* Minecraft home directory.
*/
public String modDir = "synced_mods";
/**
* Local mod list location for downloading
*/
public String localModList = "mod_list.json";
/**
* Path to the public keys ring file, relative to the Minecraft home directory.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/teacon/sync/SyncedModLocator.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public SyncedModLocator() throws Exception {
this.modDirBase = Files.createDirectories(gameDir.resolve(cfg.modDir));
this.fetchPathsTask = CompletableFuture.supplyAsync(() -> {
try {
return Utils.fetch(cfg.modList, gameDir.resolve("mod_list.json"), cfg.timeout);
return Utils.fetch(cfg.modList, gameDir.resolve(cfg.localModList), cfg.timeout);
} catch (IOException e) {
LOGGER.warn("Failed to download mod list", e);
throw new RuntimeException(e);
Expand Down

0 comments on commit 0ae3430

Please sign in to comment.