diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/RemoteMod.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/RemoteMod.java index 9542cbecd..a936f887b 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/RemoteMod.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/RemoteMod.java @@ -300,11 +300,13 @@ public final class RemoteMod { public FileDownloadTask.IntegrityCheck getIntegrityCheck() { if (hashes.containsKey("md5")) { - return new FileDownloadTask.IntegrityCheck("MD5", hashes.get("sha1")); + return new FileDownloadTask.IntegrityCheck("MD5", hashes.get("md5")); } else if (hashes.containsKey("sha1")) { return new FileDownloadTask.IntegrityCheck("SHA-1", hashes.get("sha1")); + } else if (hashes.containsKey("sha256")) { + return new FileDownloadTask.IntegrityCheck("SHA-256", hashes.get("sha256")); } else if (hashes.containsKey("sha512")) { - return new FileDownloadTask.IntegrityCheck("SHA-256", hashes.get("sha1")); + return new FileDownloadTask.IntegrityCheck("SHA-512", hashes.get("sha512")); } else { return null; }