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

dev/0.11
modmuss50 2020-02-05 20:20:43 +00:00
parent 46b616af0f
commit 6049ca48f4
1 changed files with 2 additions and 4 deletions

View File

@ -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);