mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-08 19:35:36 -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));
|
||||
return new Task() {
|
||||
@Override
|
||||
public Collection<? extends Task> getDependents() {
|
||||
public Collection<Task> getDependents() {
|
||||
return Collections.singleton(task);
|
||||
}
|
||||
|
||||
@ -104,7 +104,6 @@ public final class ForgeBMCLVersionList extends VersionList<ForgeRemoteVersion>
|
||||
private final String branch;
|
||||
private final String mcversion;
|
||||
private final String version;
|
||||
private final int build;
|
||||
private final List<File> files;
|
||||
|
||||
/**
|
||||
@ -112,14 +111,13 @@ public final class ForgeBMCLVersionList extends VersionList<ForgeRemoteVersion>
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
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.mcversion = mcversion;
|
||||
this.version = version;
|
||||
this.build = build;
|
||||
this.files = files;
|
||||
}
|
||||
|
||||
@ -135,10 +133,6 @@ public final class ForgeBMCLVersionList extends VersionList<ForgeRemoteVersion>
|
||||
return version;
|
||||
}
|
||||
|
||||
public int getBuild() {
|
||||
return build;
|
||||
}
|
||||
|
||||
public List<File> getFiles() {
|
||||
return files;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user