change asset url to https

This commit is contained in:
Pierce 2018-10-29 20:55:03 -04:00
parent 85fb677f47
commit 9f1f972d0e

View file

@ -41,7 +41,7 @@ module.exports.getVersion = function (version) {
const parsed = JSON.parse(body); const parsed = JSON.parse(body);
for (let desiredVersion in parsed.versions) { for (const desiredVersion in parsed.versions) {
if(parsed.versions[desiredVersion].id === version) { if(parsed.versions[desiredVersion].id === version) {
request.get(parsed.versions[desiredVersion].url, function(error, response, body) { request.get(parsed.versions[desiredVersion].url, function(error, response, body) {
if (error) resolve(error); if (error) resolve(error);
@ -66,7 +66,7 @@ module.exports.getJar = function (version, number, directory) {
module.exports.getAssets = function (directory, version) { module.exports.getAssets = function (directory, version) {
return new Promise(async(resolve) => { return new Promise(async(resolve) => {
const assetsUrl = 'http://resources.download.minecraft.net'; const assetsUrl = 'https://resources.download.minecraft.net';
const failed = []; const failed = [];
if(!fs.existsSync(path.join(directory, 'assets', 'indexes', `${version.assetIndex.id}.json`))) { if(!fs.existsSync(path.join(directory, 'assets', 'indexes', `${version.assetIndex.id}.json`))) {