@@ -510,7 +510,7 @@ private static async Task<JvmArgRes> MakeJvmArgAsync(this GameSettingObj obj, Lo
510510 var res = await CoreHttpClient . GetStringAsync ( login . Text1 ) ;
511511 if ( ! res . State )
512512 {
513- throw new LaunchException ( LaunchState . LoginCoreError , LanguageHelper . Get ( "Core.Error111" ) ) ;
513+ throw new LaunchException ( LaunchState . LoginCoreError ) ;
514514 }
515515 jvm . Add ( $ "-javaagent:{ AuthlibHelper . NowAuthlibInjector } ={ login . Text1 } ") ;
516516 jvm . Add ( $ "-Dauthlibinjector.yggdrasil.prefetched={ HashHelper . GenBase64 ( res . Data ! ) } ") ;
@@ -520,7 +520,7 @@ private static async Task<JvmArgRes> MakeJvmArgAsync(this GameSettingObj obj, Lo
520520 res = await CoreHttpClient . GetStringAsync ( $ "{ UrlHelper . LittleSkin } api/yggdrasil") ;
521521 if ( ! res . State )
522522 {
523- throw new LaunchException ( LaunchState . LoginCoreError , LanguageHelper . Get ( "Core.Error111" ) ) ;
523+ throw new LaunchException ( LaunchState . LoginCoreError ) ;
524524 }
525525 jvm . Add ( $ "-javaagent:{ AuthlibHelper . NowAuthlibInjector } ={ UrlHelper . LittleSkin } api/yggdrasil") ;
526526 jvm . Add ( $ "-Dauthlibinjector.yggdrasil.prefetched={ HashHelper . GenBase64 ( res . Data ! ) } ") ;
@@ -530,7 +530,7 @@ private static async Task<JvmArgRes> MakeJvmArgAsync(this GameSettingObj obj, Lo
530530 res = await CoreHttpClient . GetStringAsync ( $ "{ login . Text1 } api/yggdrasil") ;
531531 if ( ! res . State )
532532 {
533- throw new LaunchException ( LaunchState . LoginCoreError , LanguageHelper . Get ( "Core.Error111" ) ) ;
533+ throw new LaunchException ( LaunchState . LoginCoreError ) ;
534534 }
535535 jvm . Add ( $ "-javaagent:{ AuthlibHelper . NowAuthlibInjector } ={ login . Text1 } /api/yggdrasil") ;
536536 jvm . Add ( $ "-Dauthlibinjector.yggdrasil.prefetched={ HashHelper . GenBase64 ( res . Data ! ) } ") ;
@@ -616,7 +616,7 @@ public static List<string> MakeRunArg(this GameSettingObj obj, GameLaunchArg lar
616616 {
617617 var classpath = new StringBuilder ( ) ;
618618 var sep = SystemInfo . Os == OsType . Windows ? ';' : ':' ;
619- ColorMCCore . OnGameLog ( obj , LanguageHelper . Get ( "Core.Info28" ) ) ;
619+ ColorMCCore . OnGameLog ( obj , GameSystemLog . RuntimeLib ) ;
620620
621621 if ( arg . UseColorMCASM )
622622 {
@@ -675,7 +675,7 @@ public static List<string> MakeRunArg(this GameSettingObj obj, GameLaunchArg lar
675675 private static string MakeMainClass ( this GameSettingObj obj )
676676 {
677677 var version = VersionPath . GetVersion ( obj . Version )
678- ?? throw new Exception ( string . Format ( LanguageHelper . Get ( "Core.Error116" ) , obj . Version ) ) ;
678+ ?? throw new LaunchException ( LaunchState . LostVersion ) ;
679679 var v2 = version . IsGameVersionV2 ( ) ;
680680 if ( ! string . IsNullOrWhiteSpace ( obj . AdvanceJvm ? . MainClass ) )
681681 {
@@ -775,11 +775,8 @@ await Task.Run(async () =>
775775 }
776776 if ( res2 == null )
777777 {
778- res2 = await obj . BuildForgeAsync ( ) ;
779- if ( res2 == null )
780- {
781- throw new LaunchException ( LaunchState . LostLoader , LanguageHelper . Get ( "Core.Error104" ) ) ;
782- }
778+ res2 = await obj . BuildForgeAsync ( )
779+ ?? throw new LaunchException ( LaunchState . LostLoader ) ;
783780 }
784781 loader = res2 . Loaders ;
785782 install = res2 . Installs ;
@@ -796,7 +793,7 @@ await Task.Run(async () =>
796793 return ;
797794 }
798795 loader ??= await obj . BuildFabricAsync ( )
799- ?? throw new LaunchException ( LaunchState . LostLoader , LanguageHelper . Get ( "Core.Error104" ) ) ;
796+ ?? throw new LaunchException ( LaunchState . LostLoader ) ;
800797 break ;
801798 case Loaders . Quilt :
802799 loader = obj . GetQuiltLibs ( ) ;
@@ -805,7 +802,7 @@ await Task.Run(async () =>
805802 return ;
806803 }
807804 loader ??= await obj . BuildQuiltAsync ( )
808- ?? throw new LaunchException ( LaunchState . LostLoader , LanguageHelper . Get ( "Core.Error104" ) ) ;
805+ ?? throw new LaunchException ( LaunchState . LostLoader ) ;
809806 break ;
810807 case Loaders . OptiFine :
811808 loader = obj . GetOptifineLibs ( ) ;
@@ -814,22 +811,22 @@ await Task.Run(async () =>
814811 return ;
815812 }
816813 loader ??= await obj . BuildOptifineAsync ( )
817- ?? throw new LaunchException ( LaunchState . LostLoader , LanguageHelper . Get ( "Core.Error104" ) ) ;
814+ ?? throw new LaunchException ( LaunchState . LostLoader ) ;
818815 GameHelper . ReadyOptifineWrapper ( ) ;
819816 loader . Add ( GameHelper . OptifineWrapper ) ;
820817 break ;
821818 case Loaders . Custom :
822819 if ( obj . CustomLoader == null || ! File . Exists ( obj . GetGameLoaderFile ( ) ) )
823820 {
824- throw new LaunchException ( LaunchState . LostLoader , LanguageHelper . Get ( "Core.Error104" ) ) ;
821+ throw new LaunchException ( LaunchState . LostLoader ) ;
825822 }
826823
827824 if ( cancel . IsCancellationRequested )
828825 {
829826 return ;
830827 }
831- var res1 = await GameDownloadHelper . DecodeLoaderJarAsync ( obj , obj . GetGameLoaderFile ( ) , cancel )
832- ?? throw new LaunchException ( LaunchState . LostLoader , LanguageHelper . Get ( "Core.Error104" ) ) ;
828+ var res1 = await GameDownloadHelper . DecodeLoaderJarAsync ( obj , obj . GetGameLoaderFile ( ) , cancel )
829+ ?? throw new LaunchException ( LaunchState . LostLoader ) ;
833830 loader = res1 . List ? . ToList ( ) ;
834831 break ;
835832 }
@@ -895,9 +892,8 @@ await Task.Run(async () =>
895892 {
896893 //不存在json文件
897894 var res = await GameAPI . GetAssetsAsync ( game . AssetIndex . Url )
898- ?? throw new LaunchException ( LaunchState . AssetsError ,
899- LanguageHelper . Get ( "Core.Error103" ) ) ;
900- // assets = res.Assets;
895+ ?? throw new LaunchException ( LaunchState . AssetsError ) ;
896+ assets = res . Assets ;
901897 game . AddIndex ( res . Text ) ;
902898 }
903899 arg . Assets = game . AssetIndex ;
@@ -950,8 +946,8 @@ await Task.Run(async () =>
950946 if ( assets == null )
951947 {
952948 var res = await GameAPI . GetAssetsAsync ( item . AssetIndex . Url )
953- ?? throw new LaunchException ( LaunchState . AssetsError , LanguageHelper . Get ( "Core.Error103" ) ) ;
954- // assets = res.Assets;
949+ ?? throw new LaunchException ( LaunchState . AssetsError ) ;
950+ assets = res . Assets ;
955951 item . AddIndex ( res . Text ) ;
956952 }
957953 arg . Assets = item . AssetIndex ;
0 commit comments