Enable HMCL to update mod from Modrinth (#2236)
* Enable HMCL to update mod from Modrinth * Fix UI * Fix: HMCL won't select the latest version when there is newer version in several remote mod repository.
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
*/
|
||||
package org.jackhuang.hmcl.mod;
|
||||
|
||||
import org.jackhuang.hmcl.mod.curse.CurseForgeRemoteModRepository;
|
||||
import org.jackhuang.hmcl.mod.modrinth.ModrinthRemoteModRepository;
|
||||
import org.jackhuang.hmcl.task.FileDownloadTask;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -87,8 +89,18 @@ public class RemoteMod {
|
||||
}
|
||||
|
||||
public enum Type {
|
||||
CURSEFORGE,
|
||||
MODRINTH
|
||||
CURSEFORGE(CurseForgeRemoteModRepository.MODS),
|
||||
MODRINTH(ModrinthRemoteModRepository.MODS);
|
||||
|
||||
private final RemoteModRepository remoteModRepository;
|
||||
|
||||
public RemoteModRepository getRemoteModRepository() {
|
||||
return this.remoteModRepository;
|
||||
}
|
||||
|
||||
Type(RemoteModRepository remoteModRepository) {
|
||||
this.remoteModRepository = remoteModRepository;
|
||||
}
|
||||
}
|
||||
|
||||
public interface IMod {
|
||||
@@ -201,7 +213,7 @@ public class RemoteMod {
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return encodeLocation (url);
|
||||
return encodeLocation(url);
|
||||
}
|
||||
|
||||
public String getFilename() {
|
||||
|
||||
Reference in New Issue
Block a user