Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 24 additions & 16 deletions Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,18 @@
Dim Versions As JArray = Json("versions")
If Versions.Count < 200 Then Throw New Exception("获取到的版本列表长度不足(" & Json.ToString & ")")
'从指定URL获取并添加未列出的版本
Dim UnlistedJson As JObject = NetGetCodeByRequestRetry("https://zkitefly.github.io/unlisted-versions-of-minecraft/version_manifest.json", IsJson:=True)
' 替换 "pending" 为 "snapshot"
For Each versionuvmc As JObject In UnlistedJson("versions")
If versionuvmc("type").ToString() = "pending" OrElse versionuvmc("id").ToString().StartsWithF("2point0") AndAlso versionuvmc("type").ToString() = "release" Then
versionuvmc("type") = "snapshot"
End If
Next
Versions.Merge(UnlistedJson("versions"))
Try
Dim UnlistedJson As JObject = NetGetCodeByRequestRetry("https://zkitefly.github.io/unlisted-versions-of-minecraft/version_manifest.json", IsJson:=True)
' 替换 "pending" 为 "snapshot"
For Each versionuvmc As JObject In UnlistedJson("versions")
If versionuvmc("type").ToString() = "pending" OrElse versionuvmc("id").ToString().StartsWithF("2point0") AndAlso versionuvmc("type").ToString() = "release" Then
versionuvmc("type") = "snapshot"
End If
Next
Versions.Merge(UnlistedJson("versions"))
Catch ex As Exception
Log("[Download] 未列出的版本官方源加载失败: " & ex.Message)
End Try
'返回
Loader.Output = New DlClientListResult With {.IsOfficial = True, .SourceName = "Mojang 官方源", .Value = Json}
'解析更新提示(Release)
Expand Down Expand Up @@ -244,14 +248,18 @@
Dim Versions As JArray = Json("versions")
If Versions.Count < 200 Then Throw New Exception("获取到的版本列表长度不足(" & Json.ToString & ")")
'从指定URL获取并添加未列出的版本
Dim UnlistedJson As JObject = NetGetCodeByRequestRetry("https://raw.gitcode.com/zkitefly/unlisted-versions-of-minecraft/raw/main/version_manifest.json", IsJson:=True)
' 替换 "pending" 为 "snapshot"
For Each versionuvmc As JObject In UnlistedJson("versions")
If versionuvmc("type").ToString() = "pending" OrElse versionuvmc("id").ToString().StartsWithF("2point0") AndAlso versionuvmc("type").ToString() = "release" Then
versionuvmc("type") = "snapshot"
End If
Next
Versions.Merge(UnlistedJson("versions"))
Try
Dim UnlistedJson As JObject = NetGetCodeByRequestRetry("https://raw.gitcode.com/zkitefly/unlisted-versions-of-minecraft/raw/main/version_manifest.json", IsJson:=True)
' 替换 "pending" 为 "snapshot"
For Each versionuvmc As JObject In UnlistedJson("versions")
If versionuvmc("type").ToString() = "pending" OrElse versionuvmc("id").ToString().StartsWithF("2point0") AndAlso versionuvmc("type").ToString() = "release" Then
versionuvmc("type") = "snapshot"
End If
Next
Versions.Merge(UnlistedJson("versions"))
Catch ex As Exception
Log("[Download] 未列出的版本镜像源加载失败: " & ex.Message)
End Try
'返回
Loader.Output = New DlClientListResult With {.IsOfficial = False, .SourceName = "BMCLAPI", .Value = Json}
Catch ex As Exception
Expand Down