Skip to content

Commit

Permalink
update Nuget
Browse files Browse the repository at this point in the history
  • Loading branch information
laolarou726 committed Feb 13, 2025
1 parent 259050c commit 8b9571d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
14 changes: 14 additions & 0 deletions ProjBobcat/ProjBobcat/Class/Helper/GameVersionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ public static partial class GameVersionHelper
[GeneratedRegex(@"1.\d{1,2}(.\d{1,2})*")]
private static partial Regex McVersionMatch();

public static ModLoaderType TryGetGameModLoaderType(RawVersionModel version)
{
if (version.Libraries.Any(lib => lib.Name.Contains("neoforged", StringComparison.OrdinalIgnoreCase)))
return ModLoaderType.NeoForge;
if (version.Libraries.Any(lib => lib.Name.Contains("minecraftforge", StringComparison.OrdinalIgnoreCase)))
return ModLoaderType.Forge;
if (version.Libraries.Any(lib => lib.Name.Contains("fabricmc", StringComparison.OrdinalIgnoreCase)))
return ModLoaderType.Fabric;
if (version.Libraries.Any(lib => lib.Name.Contains("quilt", StringComparison.OrdinalIgnoreCase)))
return ModLoaderType.Quilt;

return ModLoaderType.Unknown;
}

public static string? TryGetMcVersion(List<RawVersionModel> versions)
{
foreach (var version in versions)
Expand Down
8 changes: 4 additions & 4 deletions ProjBobcat/ProjBobcat/ProjBobcat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ resolved the issue that LaunchWrapper may not return the correct exit code

<!-- Dependencies -->
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.2" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="9.0.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Management" Version="9.0.1" />
<PackageReference Include="System.Management" Version="9.0.2" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="9.0.1" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="9.0.2" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 8b9571d

Please sign in to comment.