Fix not always downloading version_manifest.json, can lead to missing versions

This commit is contained in:
modmuss50 2020-02-05 20:20:43 +00:00
parent 46b616af0f
commit 6049ca48f4

View file

@ -129,10 +129,8 @@ public class MinecraftProvider extends DependencyProvider {
throw new GradleException("Version manifests not found at " + manifests.getAbsolutePath());
}
} else {
if (StaticPathWatcher.INSTANCE.hasFileChanged(manifests.toPath())) {
project.getLogger().debug("Downloading version manifests");
DownloadUtil.downloadIfChanged(new URL("https://launchermeta.mojang.com/mc/game/version_manifest.json"), manifests, project.getLogger());
}
project.getLogger().debug("Downloading version manifests");
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();