From badc726df3050c7b1e23793c5c7187487219c718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9trus=20Pradella?= Date: Sat, 14 Sep 2024 17:59:27 -0300 Subject: [PATCH] Fix version_manifest_v2.json versions extraction The versions from https://launchermeta.mojang.com/mc/game/version_manifest_v2.js are now under {"versions":[]} field --- app/Libraries/MinecraftUtils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Libraries/MinecraftUtils.php b/app/Libraries/MinecraftUtils.php index 784e1499..113da726 100644 --- a/app/Libraries/MinecraftUtils.php +++ b/app/Libraries/MinecraftUtils.php @@ -46,7 +46,7 @@ public static function fetchVersions() // The format is ['1.12.2' => ['version' => '1.12.2'], ...] $versions = []; - foreach ($json as $mojangVersion) { + foreach ($json['versions'] as $mojangVersion) { if ($mojangVersion['type'] !== 'release') { continue; }