diff --git a/Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb b/Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb index 78907b57..b6db08cf 100644 --- a/Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb +++ b/Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb @@ -752,6 +752,10 @@ ''' 是否是 Beta 版。若未提供则默认为 False。 ''' Public IsBeta As Boolean = False + ''' + ''' 标准的版本号 + ''' + Public StdVersion As String Public Structure DlNeoForgeListResult ''' ''' 数据来源名称,如“Official”,“BMCLAPI”。 @@ -897,17 +901,19 @@ Dim Versions As New List(Of DlNeoForgeVersionEntry) Try For Each Token As JObject In Json - Dim Name As String + Dim Name As String '存储 rawVersion,貌似变化更加频繁 + Dim StdVersion As String '存储 version,相对规则 Dim IsBeta As Boolean If Token("version").Contains("-beta") Then - Name = Token("version").ToString() - "-beta" + StdVersion = Token("version").ToString() - "-beta" IsBeta = True Else - Name = Token("version") + StdVersion = Token("version").ToString() IsBeta = False End If + Name = Token("rawVersion") Dim Inherit As String = Token("mcversion") - Dim Entry = New DlNeoForgeVersionEntry With {.Version = Name, .Inherit = Inherit, .IsBeta = IsBeta} + Dim Entry = New DlNeoForgeVersionEntry With {.Version = Name, .Inherit = Inherit, .IsBeta = IsBeta, .StdVersion = StdVersion} Versions.Add(Entry) Next 'For Each Token As JObject In Json diff --git a/Plain Craft Launcher 2/Pages/PageDownload/ModDownloadLib.vb b/Plain Craft Launcher 2/Pages/PageDownload/ModDownloadLib.vb index 97a63446..9a58b325 100644 --- a/Plain Craft Launcher 2/Pages/PageDownload/ModDownloadLib.vb +++ b/Plain Craft Launcher 2/Pages/PageDownload/ModDownloadLib.vb @@ -2241,11 +2241,10 @@ Retry: '获取最新版本 Dim FreshVersion As DlNeoForgeVersionEntry = Nothing If Entrys.Any Then - FreshVersion = Entrys(0) + FreshVersion = Entrys.Last() Else Log("[System] 未找到可用的 NeoForge 版本", LogLevel.Debug) End If - Dim RecommendedVersion As DlNeoForgeVersionEntry = Nothing '显示各个版本 If FreshVersion IsNot Nothing Then Dim Fresh = NeoForgeDownloadListItem(FreshVersion, OnClick, IsSaveOnly) diff --git a/Plain Craft Launcher 2/Pages/PageDownload/PageDownloadInstall.xaml.vb b/Plain Craft Launcher 2/Pages/PageDownload/PageDownloadInstall.xaml.vb index e93e7789..8d3808d9 100644 --- a/Plain Craft Launcher 2/Pages/PageDownload/PageDownloadInstall.xaml.vb +++ b/Plain Craft Launcher 2/Pages/PageDownload/PageDownloadInstall.xaml.vb @@ -974,9 +974,11 @@ If Not Loader.Output.Any() Then Exit Sub PanNeoForge.Children.Clear() + Dim VersionsArray As Array = Versions.ToArray() + VersionsArray.Reverse(VersionsArray) 'Versions = Sort(Versions, Function(a, b) New Version(a.Version) > New Version(b.Version)).ToList NeoForgeDownloadListItemPreload(PanNeoForge, Versions, AddressOf NeoForge_Selected, False) - For Each Version In Versions + For Each Version In VersionsArray PanNeoForge.Children.Add(NeoForgeDownloadListItem(Version, AddressOf NeoForge_Selected, False)) Next Catch ex As Exception