From 809a281a7eeeb67697fb006317970d078c754718 Mon Sep 17 00:00:00 2001 From: tangge233 Date: Wed, 4 Jun 2025 22:54:56 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BF=AE=E6=94=B9=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plain Craft Launcher 2/Modules/Minecraft/ModMod.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Plain Craft Launcher 2/Modules/Minecraft/ModMod.vb b/Plain Craft Launcher 2/Modules/Minecraft/ModMod.vb index 65f152d..bb9b3d5 100644 --- a/Plain Craft Launcher 2/Modules/Minecraft/ModMod.vb +++ b/Plain Craft Launcher 2/Modules/Minecraft/ModMod.vb @@ -939,7 +939,7 @@ Finished: '开始网络获取 Log($"[Mod] 目标加载器:{ModLoaders.Join("/")},版本:{McVersion}") Dim EndedThreadCount As Integer = 0, IsFailed As Boolean = False - Dim ThisThread As Thread = Thread.CurrentThread + Dim CurrentTaskThread As Thread = Thread.CurrentThread '从 Modrinth 获取信息 RunInNewThread( Sub() @@ -963,7 +963,7 @@ Finished: Dim File As New CompFile(ModrinthVersion(Entry.ModrinthHash), CompType.Mod) If Entry.CompFile Is Nothing OrElse Entry.CompFile.ReleaseDate < File.ReleaseDate Then Entry.CompFile = File Next - If Loader.IsAbortedWithThread(ThisThread) Then Return + If Loader.IsAbortedWithThread(CurrentTaskThread) Then Return Log($"[Mod] 需要从 Modrinth 获取 {ModrinthMapping.Count} 个本地 Mod 的工程信息") '步骤 3:获取工程信息 If Not ModrinthMapping.Any() Then Return @@ -1013,7 +1013,7 @@ Finished: Dim CurseForgeHashes As New List(Of UInteger) For Each Entry In Mods CurseForgeHashes.Add(Entry.CurseForgeHash) - If Loader.IsAbortedWithThread(ThisThread) Then Return + If Loader.IsAbortedWithThread(CurrentTaskThread) Then Return Next Dim CurseForgeRaw = CType(CType(GetJson(DlModRequest("https://api.curseforge.com/v1/fingerprints/432", "POST", $"{{""fingerprints"": [{CurseForgeHashes.Join(",")}]}}", "application/json")), JObject)("data")("exactMatches"), JContainer) @@ -1034,7 +1034,7 @@ Finished: If Entry.CompFile Is Nothing OrElse Entry.CompFile.ReleaseDate < File.ReleaseDate Then Entry.CompFile = File Next Next - If Loader.IsAbortedWithThread(ThisThread) Then Return + If Loader.IsAbortedWithThread(CurrentTaskThread) Then Return Log($"[Mod] 需要从 CurseForge 获取 {CurseForgeMapping.Count} 个本地 Mod 的工程信息") '步骤 3:获取工程信息 If Not CurseForgeMapping.Any() Then Return