diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..d09a50ca3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "svg.preview.background": "transparent" +} \ No newline at end of file diff --git a/log.md b/log.md index 276a93835..6e16528df 100644 --- a/log.md +++ b/log.md @@ -5,8 +5,22 @@ - 加入OpenP2P - 加入hal映射 +## 已知问题 +- 日志窗口与主窗口启动数据不同步 +- 游戏其他失败后不能再次启动 +- 游戏取消启动处理错误 + ## 已完成 Done -### 2024.12.22 +### 2024.12.24 +- 修复游戏无法启动问题 +- 修复自定义加载器问题 +- 调整启动器背景音乐播放逻辑 +- 调整启动器主界面图标 +- 调整启动器主界面布局 +- 调整Minecraft News显示方式 +- 添加MP3ID3读取 + +### 2024.12.22(A34) - 修复皮肤显示问题 - 修复登录会产生的崩溃 diff --git a/src/ColorMC.Core/CoreMain.cs b/src/ColorMC.Core/CoreMain.cs index d272e7ae4..77afe88a8 100644 --- a/src/ColorMC.Core/CoreMain.cs +++ b/src/ColorMC.Core/CoreMain.cs @@ -16,7 +16,7 @@ public static class ColorMCCore { public const int VersionNum = 34; public const string TopVersion = "A34"; - public const string DateVersion = "20241222"; + public const string DateVersion = "20241224"; /// /// 版本号 @@ -159,7 +159,8 @@ public static class ColorMCCore /// 手机端启动 /// public static Func, - Dictionary, IGameHandel> PhoneGameLaunch { internal get; set; } + Dictionary, IGameHandel> PhoneGameLaunch + { internal get; set; } /// /// 手机端Jvm安装 /// diff --git a/src/ColorMC.Core/Game/Mods.cs b/src/ColorMC.Core/Game/Mods.cs index 207988233..231b9d702 100644 --- a/src/ColorMC.Core/Game/Mods.cs +++ b/src/ColorMC.Core/Game/Mods.cs @@ -459,7 +459,7 @@ private static async Task CheckJarInJarAsync(ModObj obj, ZipFile zFile) } catch { - + } } @@ -577,8 +577,8 @@ private static async Task CheckJarInJarAsync(ModObj obj, ZipFile zFile) istest = true; } catch - { - + { + } } } @@ -641,9 +641,9 @@ private static async Task CheckJarInJarAsync(ModObj obj, ZipFile zFile) istest = true; } - catch + catch { - + } } } @@ -695,8 +695,8 @@ private static async Task CheckJarInJarAsync(ModObj obj, ZipFile zFile) istest = true; } catch - { - + { + } } } diff --git a/src/ColorMC.Core/Helpers/CheckHelpers.cs b/src/ColorMC.Core/Helpers/CheckHelpers.cs index 9fc52639b..9073058db 100644 --- a/src/ColorMC.Core/Helpers/CheckHelpers.cs +++ b/src/ColorMC.Core/Helpers/CheckHelpers.cs @@ -445,6 +445,7 @@ public static async Task> CheckGameFileAsync(this var item = node.Value; if (item.Path != "mods") { + node = node.Next; array.Remove(item); continue; } diff --git a/src/ColorMC.Core/Helpers/ModPackHelper.cs b/src/ColorMC.Core/Helpers/ModPackHelper.cs index d61194fdb..84265fabc 100644 --- a/src/ColorMC.Core/Helpers/ModPackHelper.cs +++ b/src/ColorMC.Core/Helpers/ModPackHelper.cs @@ -434,13 +434,22 @@ public static async Task InstallCurseForgeModPackAsync(InstallModPackZi arg.Name = $"{info.Name}-{info.Version}"; } + var gameversion = info.Minecraft.Version; + if (VersionPath.CheckUpdateAsync(gameversion) == null) + { + await VersionPath.GetFromWebAsync(); + if (VersionPath.CheckUpdateAsync(gameversion) == null) + { + return new(); + } + } //创建游戏实例 var game = new GameSettingObj() { GroupName = arg.Group, Name = arg.Name, - Version = info.Minecraft.Version, + Version = gameversion, ModPack = true, Loader = loaders, ModPackType = SourceType.CurseForge, @@ -828,6 +837,16 @@ public static async Task InstallModrinthModPackAsync(InstallModPackZipA arg.Name = $"{info.Name}-{info.VersionId}"; } + var gameversion = info.Dependencies["minecraft"]; + if (VersionPath.CheckUpdateAsync(gameversion) == null) + { + await VersionPath.GetFromWebAsync(); + if (VersionPath.CheckUpdateAsync(gameversion) == null) + { + return new(); + } + } + //创建游戏实例 var game = await InstancesPath.CreateGame(new CreateGameArg { @@ -835,7 +854,7 @@ public static async Task InstallModrinthModPackAsync(InstallModPackZipA { GroupName = arg.Group, Name = arg.Name, - Version = info.Dependencies["minecraft"], + Version = gameversion, ModPack = true, ModPackType = SourceType.Modrinth, Loader = loaders, diff --git a/src/ColorMC.Core/Helpers/PathHelper.cs b/src/ColorMC.Core/Helpers/PathHelper.cs index 688c1e49f..3cdae54ad 100644 --- a/src/ColorMC.Core/Helpers/PathHelper.cs +++ b/src/ColorMC.Core/Helpers/PathHelper.cs @@ -77,7 +77,7 @@ public static Task MoveToTrash(string dir) } catch { - + } return false; diff --git a/src/ColorMC.Core/Hook/Win32.cs b/src/ColorMC.Core/Hook/Win32.cs index 76977087e..7673180fb 100644 --- a/src/ColorMC.Core/Hook/Win32.cs +++ b/src/ColorMC.Core/Hook/Win32.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.InteropServices; namespace ColorMC.Core.Hook; diff --git a/src/ColorMC.Core/Net/Login/LegacyLogin.cs b/src/ColorMC.Core/Net/Login/LegacyLogin.cs index 0a053691a..c363326c6 100644 --- a/src/ColorMC.Core/Net/Login/LegacyLogin.cs +++ b/src/ColorMC.Core/Net/Login/LegacyLogin.cs @@ -108,7 +108,7 @@ public static async Task AuthenticateAsync(string server, string return new LegacyLoginRes { State = LoginState.Done, - Auth = new() + Auth = new() { UserName = obj2.SelectedProfile.Name, UUID = obj2.SelectedProfile.Id, diff --git a/src/ColorMC.Gui/ColorMC.Gui.csproj b/src/ColorMC.Gui/ColorMC.Gui.csproj index f491e2922..92db11c62 100644 --- a/src/ColorMC.Gui/ColorMC.Gui.csproj +++ b/src/ColorMC.Gui/ColorMC.Gui.csproj @@ -175,6 +175,8 @@ + + @@ -304,6 +306,7 @@ + @@ -317,6 +320,7 @@ +