From f83afdbbc1912392fbd68c4d068663448f564241 Mon Sep 17 00:00:00 2001 From: Pigeon0v0 Date: Fri, 21 Jun 2024 16:38:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=201.20.1=20NeoForge=20=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E6=8B=BC=E6=8E=A5=E5=8F=AF=E8=83=BD=E6=9C=89?= =?UTF-8?q?=E8=AF=AF=EF=BC=88=E5=A6=82=E6=9E=9C=E7=89=88=E6=9C=AC=E4=B8=BA?= =?UTF-8?q?=201.20.1=20=E5=88=99=E7=A1=AC=E7=BC=96=E7=A0=81=E4=BB=A5?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E9=97=AE=E9=A2=98=EF=BC=89=20fix:=20?= =?UTF-8?q?=E6=95=B4=E5=90=88=E5=8C=85=E5=AE=89=E8=A3=85=E6=97=B6=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF=E6=96=87=E6=9C=AC=E6=9C=89=E8=AF=AF?= =?UTF-8?q?=20chores:=20=E4=BB=A3=E7=A0=81=E6=B8=85=E7=90=86=EF=BC=88NeoFo?= =?UTF-8?q?rge=20=E4=B8=8D=E9=9C=80=E8=A6=81=E9=83=A8=E5=88=86=20Forge=20?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=89=20fix(=E6=9C=AA=E5=AE=8C=E6=88=90):?= =?UTF-8?q?=20=E5=AE=98=E6=96=B9=E6=BA=90=E7=89=88=E6=9C=AC=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Minecraft/ModDownload.vb | 12 ++---------- .../Modules/Minecraft/ModModpack.vb | 6 +----- .../Pages/PageDownload/ModDownloadLib.vb | 17 ----------------- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb b/Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb index 0b39091..b1df6c3 100644 --- a/Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb +++ b/Plain Craft Launcher 2/Modules/Minecraft/ModDownload.vb @@ -771,14 +771,6 @@ Public Value As JObject End Structure ''' - ''' 是否为新版 NeoForge。(即为 Minecraft 1.13+) - ''' - Public ReadOnly Property IsNewType As Boolean - Get - Return Version.Split(".")(0) >= 20 - End Get - End Property - ''' ''' 构建数。 ''' Public ReadOnly Property Build As Integer @@ -805,7 +797,7 @@ Public ReadOnly Property FileName As String Get If StdVersion.StartsWith("47.") Then 'NeoForge 1.20.1 的版本命名有些特殊... - Return "forge-" & Inherit & "-" & StdVersion & If(IsBeta, "-beta", "") & "-" & "installer" & "." & "jar" + Return "forge-" & "1.20.1" & "-" & StdVersion & If(IsBeta, "-beta", "") & "-" & "installer" & "." & "jar" Else Return "neoforge-" & StdVersion & If(IsBeta, "-beta", "") & "-" & "installer" & "." & "jar" End If @@ -859,8 +851,8 @@ End Try If Result.Length < 50 Then Throw New Exception("获取到的版本列表长度不足(" & Result & ")") ResultJson = GetJson(Result) + Dim VersionArray As Array = ResultJson("versions") Dim Versions As New List(Of DlNeoForgeVersionEntry) - Dim VersionList As String = ResultJson("versions") If Not Versions.Any() Then Throw New Exception("没有可用版本") Loader.Output = Versions End Sub diff --git a/Plain Craft Launcher 2/Modules/Minecraft/ModModpack.vb b/Plain Craft Launcher 2/Modules/Minecraft/ModModpack.vb index b11f875..b9327b4 100644 --- a/Plain Craft Launcher 2/Modules/Minecraft/ModModpack.vb +++ b/Plain Craft Launcher 2/Modules/Minecraft/ModModpack.vb @@ -202,16 +202,12 @@ Retry: End Try ElseIf Id.StartsWithF("neoforge-") Then 'NeoForge 指定 - If Id.Contains("recommended") Then - Log("[ModPack] 该整合包版本过老,已不支持进行安装!", LogLevel.Hint) - Exit Sub - End If Try Log("[ModPack] 整合包 NeoForge 版本:" & Id) NeoForgeVersion = Id.Split("-")(1) Exit For Catch ex As Exception - Log(ex, "读取整合包 Forge 版本失败:" & Id) + Log(ex, "读取整合包 NeoForge 版本失败:" & Id) End Try ElseIf Id.StartsWithF("fabric-") Then 'Fabric 指定 diff --git a/Plain Craft Launcher 2/Pages/PageDownload/ModDownloadLib.vb b/Plain Craft Launcher 2/Pages/PageDownload/ModDownloadLib.vb index 625b4da..8a1b618 100644 --- a/Plain Craft Launcher 2/Pages/PageDownload/ModDownloadLib.vb +++ b/Plain Craft Launcher 2/Pages/PageDownload/ModDownloadLib.vb @@ -1699,23 +1699,6 @@ Retry: #Region "NeoForge 下载" Public Sub McDownloadNeoForge(DownloadInfo As DlNeoForgeVersionEntry) - '老版本提示 - If DownloadInfo.Category = "client" Then - If MyMsgBox("该 Forge 版本过于古老,PCL 暂不支持该版本的自动安装。" & vbCrLf & - "若你仍然希望继续,PCL 将把安装程序下载到你指定的位置,但不会进行安装。", - "版本过老", "继续", "取消") = 1 Then - McDownloadNeoForgeSave(DownloadInfo) - End If - Exit Sub - End If - If DownloadInfo.Category = "universal" OrElse DownloadInfo.Inherit.StartsWithF("1.5") Then '对该版本自动安装的支持将在之后加入 - If MyMsgBox("该 Forge 版本过于古老,PCL 暂不支持该版本的自动安装。" & vbCrLf & - "若你仍然希望继续,PCL 将把安装程序下载到你指定的位置,但不会进行安装。", - "版本过老", "继续", "取消") = 1 Then - McDownloadNeoForgeSave(DownloadInfo) - End If - Exit Sub - End If '初始化参数 Dim Id As String = DownloadInfo.Inherit & "-neoforge-" & DownloadInfo.Version Dim Target As String = PathTemp & "Cache\Code\NeoForgeInstall-" & DownloadInfo.Version & "_" & GetUuid() & "." & DownloadInfo.FileSuffix