mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-14 06:17:47 -04:00
显示 Forge 发版时间 (#3256)
* 显示时间 * Fix * update * update --------- Co-authored-by: Glavo <zjx001202@gmail.com>
This commit is contained in:
parent
738000ff39
commit
48417b9b7b
@ -33,7 +33,7 @@ public final class ForgeVersion implements Validation {
|
||||
private final String jobver;
|
||||
private final String version;
|
||||
private final int build;
|
||||
private final double modified;
|
||||
private final long modified;
|
||||
private final String[][] files;
|
||||
|
||||
/**
|
||||
@ -44,7 +44,7 @@ public final class ForgeVersion implements Validation {
|
||||
this(null, null, null, null, 0, 0, null);
|
||||
}
|
||||
|
||||
public ForgeVersion(String branch, String mcversion, String jobver, String version, int build, double modified, String[][] files) {
|
||||
public ForgeVersion(String branch, String mcversion, String jobver, String version, int build, long modified, String[][] files) {
|
||||
this.branch = branch;
|
||||
this.mcversion = mcversion;
|
||||
this.jobver = jobver;
|
||||
@ -74,7 +74,7 @@ public final class ForgeVersion implements Validation {
|
||||
return build;
|
||||
}
|
||||
|
||||
public double getModified() {
|
||||
public long getModified() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import org.jackhuang.hmcl.util.StringUtils;
|
||||
import org.jackhuang.hmcl.util.io.HttpRequest;
|
||||
import org.jackhuang.hmcl.util.versioning.VersionNumber;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@ -79,8 +80,12 @@ public final class ForgeVersionList extends VersionList<ForgeRemoteVersion> {
|
||||
|
||||
if (jar == null)
|
||||
continue;
|
||||
|
||||
versions.put(gameVersion, new ForgeRemoteVersion(
|
||||
toLookupVersion(version.getGameVersion()), version.getVersion(), null, Collections.singletonList(jar)
|
||||
toLookupVersion(version.getGameVersion()),
|
||||
version.getVersion(),
|
||||
version.getModified() > 0 ? Instant.ofEpochSecond(version.getModified()) : null,
|
||||
Collections.singletonList(jar)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user