Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
up 修复整合包安装问题
Browse files Browse the repository at this point in the history
Coloryr committed Feb 26, 2024
1 parent 6d361ba commit 5a7e4ad
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ColorMC.Core/ColorMC.Core.csproj
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@

<ItemGroup>
<PackageReference Include="Heijden.Dns.Portable" Version="2.0.19" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.58" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.59" />
<PackageReference Include="Jint" Version="3.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
4 changes: 2 additions & 2 deletions src/ColorMC.Core/CoreMain.cs
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@ namespace ColorMC.Core;

public static class ColorMCCore
{
public const string TopVersion = "A24";
public const string DateVersion = "20240225";
public const string TopVersion = "A24.1";
public const string DateVersion = "20240226";

public const string Version = $"{TopVersion}.{DateVersion}";

8 changes: 5 additions & 3 deletions src/ColorMC.Core/Helpers/ModPackHelper.cs
Original file line number Diff line number Diff line change
@@ -309,7 +309,7 @@ public static async Task<bool> UpdateCurseForgeModPackAsync(GameSettingObj obj,

update2(CoreRunState.Download);

await DownloadManager.StartAsync(list.List.ToList());
await DownloadManager.StartAsync([.. list.List]);

return (true, game);
}
@@ -352,12 +352,14 @@ public static async Task<bool> UpdateCurseForgeModPackAsync(GameSettingObj obj,
var info1 = await CurseForgeAPI.GetModInfo(item.modId);
if (info1 != null)
{
if (info1.Data.categories.Any(item => item.classId == CurseForgeAPI.ClassResourcepack))
if (info1.Data.categories.Any(item => item.classId == CurseForgeAPI.ClassResourcepack)
|| info1.Data.classId == CurseForgeAPI.ClassResourcepack)
{
path = respath;
path1 = respath1;
}
else if (info1.Data.categories.Any(item => item.classId == CurseForgeAPI.ClassResourcepack))
else if (info1.Data.categories.Any(item => item.classId == CurseForgeAPI.ClassShaderpack)
|| info1.Data.classId == CurseForgeAPI.ClassShaderpack)
{
path = shapath;
path1 = shapath1;
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/UIBinding/BaseBinding.cs
Original file line number Diff line number Diff line change
@@ -594,7 +594,7 @@ await Launch(obj, (a) =>
});
}
}
catch (Exception e)
catch
{

}

0 comments on commit 5a7e4ad

Please sign in to comment.