Fix not always downloading version_manifest.json, can lead to missing versions
parent
46b616af0f
commit
6049ca48f4
|
@ -129,11 +129,9 @@ public class MinecraftProvider extends DependencyProvider {
|
||||||
throw new GradleException("Version manifests not found at " + manifests.getAbsolutePath());
|
throw new GradleException("Version manifests not found at " + manifests.getAbsolutePath());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (StaticPathWatcher.INSTANCE.hasFileChanged(manifests.toPath())) {
|
|
||||||
project.getLogger().debug("Downloading version manifests");
|
project.getLogger().debug("Downloading version manifests");
|
||||||
DownloadUtil.downloadIfChanged(new URL("https://launchermeta.mojang.com/mc/game/version_manifest.json"), manifests, project.getLogger());
|
DownloadUtil.downloadIfChanged(new URL("https://launchermeta.mojang.com/mc/game/version_manifest.json"), manifests, project.getLogger());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String versionManifest = Files.asCharSource(manifests, StandardCharsets.UTF_8).read();
|
String versionManifest = Files.asCharSource(manifests, StandardCharsets.UTF_8).read();
|
||||||
ManifestVersion mcManifest = new GsonBuilder().create().fromJson(versionManifest, ManifestVersion.class);
|
ManifestVersion mcManifest = new GsonBuilder().create().fromJson(versionManifest, ManifestVersion.class);
|
||||||
|
|
Loading…
Reference in New Issue