mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 12:26:16 -04:00
Fix NumberFormatException when parsing forge version list json
This commit is contained in:
parent
8007f1958e
commit
def45cc3e4
@ -60,7 +60,7 @@ public final class ForgeBMCLVersionList extends VersionList<ForgeRemoteVersion>
|
|||||||
final GetTask task = new GetTask(NetworkUtils.toURL("https://bmclapi2.bangbang93.com/forge/minecraft/" + gameVersion));
|
final GetTask task = new GetTask(NetworkUtils.toURL("https://bmclapi2.bangbang93.com/forge/minecraft/" + gameVersion));
|
||||||
return new Task() {
|
return new Task() {
|
||||||
@Override
|
@Override
|
||||||
public Collection<? extends Task> getDependents() {
|
public Collection<Task> getDependents() {
|
||||||
return Collections.singleton(task);
|
return Collections.singleton(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +104,6 @@ public final class ForgeBMCLVersionList extends VersionList<ForgeRemoteVersion>
|
|||||||
private final String branch;
|
private final String branch;
|
||||||
private final String mcversion;
|
private final String mcversion;
|
||||||
private final String version;
|
private final String version;
|
||||||
private final int build;
|
|
||||||
private final List<File> files;
|
private final List<File> files;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -112,14 +111,13 @@ public final class ForgeBMCLVersionList extends VersionList<ForgeRemoteVersion>
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public ForgeVersion() {
|
public ForgeVersion() {
|
||||||
this(null, null, null, 0, null);
|
this(null, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ForgeVersion(String branch, String mcversion, String version, int build, List<File> files) {
|
public ForgeVersion(String branch, String mcversion, String version, List<File> files) {
|
||||||
this.branch = branch;
|
this.branch = branch;
|
||||||
this.mcversion = mcversion;
|
this.mcversion = mcversion;
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.build = build;
|
|
||||||
this.files = files;
|
this.files = files;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,10 +133,6 @@ public final class ForgeBMCLVersionList extends VersionList<ForgeRemoteVersion>
|
|||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getBuild() {
|
|
||||||
return build;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<File> getFiles() {
|
public List<File> getFiles() {
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user