diff --git a/pkgs/games/minecraft-servers/update.py b/pkgs/games/minecraft-servers/update.py index 0e7f10a8c932..f272c8b71a84 100755 --- a/pkgs/games/minecraft-servers/update.py +++ b/pkgs/games/minecraft-servers/update.py @@ -117,8 +117,11 @@ def get_latest_major_releases(releases: List[Version]) -> Dict[str, Version]: Version object for 1.16.5. """ return { - major_release: sorted(releases, key=lambda x: x.id, reverse=True)[0] - for major_release, releases in group_major_releases(releases).items() + major_release: max( + (release for release in releases if get_major_release(release.id) == major_release), + key=lambda x: tuple(map(int, x.id.split('.'))), + ) + for major_release in group_major_releases(releases) } diff --git a/pkgs/games/minecraft-servers/versions.json b/pkgs/games/minecraft-servers/versions.json index 8c751bf70074..142ef4e51c5d 100644 --- a/pkgs/games/minecraft-servers/versions.json +++ b/pkgs/games/minecraft-servers/versions.json @@ -1,8 +1,8 @@ { "1.20": { - "url": "https://piston-data.mojang.com/v1/objects/15c777e2cfe0556eef19aab534b186c0c6f277e1/server.jar", - "sha1": "15c777e2cfe0556eef19aab534b186c0c6f277e1", - "version": "1.20", + "url": "https://piston-data.mojang.com/v1/objects/84194a2f286ef7c14ed7ce0090dba59902951553/server.jar", + "sha1": "84194a2f286ef7c14ed7ce0090dba59902951553", + "version": "1.20.1", "javaVersion": 17 }, "1.19": { @@ -78,9 +78,9 @@ "javaVersion": 8 }, "1.7": { - "url": "https://launcher.mojang.com/v1/objects/4cec86a928ec171fdc0c6b40de2de102f21601b5/server.jar", - "sha1": "4cec86a928ec171fdc0c6b40de2de102f21601b5", - "version": "1.7.9", + "url": "https://launcher.mojang.com/v1/objects/952438ac4e01b4d115c5fc38f891710c4941df29/server.jar", + "sha1": "952438ac4e01b4d115c5fc38f891710c4941df29", + "version": "1.7.10", "javaVersion": 8 }, "1.6": {