Skip to content

Commit

Permalink
add InheritsFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
laolarou726 committed Apr 11, 2024
1 parent 1b08a8c commit f0bf316
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ProjBobcat/ProjBobcat/Class/Model/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class VersionInfo

public required string DirName { get; init; }

public required string? InheritsFrom { get; set; }

public required string GameBaseVersion { get; init; }

public JavaVersionModel? JavaVersion { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace ProjBobcat.DefaultComponent.Launch;
/// </summary>
public sealed class DefaultVersionLocator : VersionLocatorBase
{
public NativeReplacementPolicy NativeReplacementPolicy { get; set; } = NativeReplacementPolicy.LegacyOnly;
public NativeReplacementPolicy NativeReplacementPolicy { get; init; } = NativeReplacementPolicy.LegacyOnly;

/// <summary>
/// 构造函数。
Expand Down Expand Up @@ -390,6 +390,7 @@ public override (List<NativeFileInfo>, List<FileInfo>) GetNatives(Library[] libr
Natives = [],
Logging = rawVersion.Logging,
Id = rawVersion.Id,
InheritsFrom = rawVersion.InheritsFrom,
GameBaseVersion = GameVersionHelper.TryGetMcVersion([.. (inherits ?? []), rawVersion]) ?? id,
DirName = id,
Name = id,
Expand Down

0 comments on commit f0bf316

Please sign in to comment.