Skip to content

Commit

Permalink
fix: Correct the natives filter algorithm. Should not parse new nativ…
Browse files Browse the repository at this point in the history
…es as common native libraries.
  • Loading branch information
ci010 committed Feb 24, 2024
1 parent bc44af6 commit 3cd7d19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ export namespace Version {
if (platform.name === osRule.name &&
(!osRule.version || platform.version.match(osRule.version))) {
apply = true
if (osRule.arch) {
const ruleArch = osRule.arch === 'x86' ? 'ia32' : osRule.arch
apply = ruleArch === platform.arch
}
}
}
if (apply) {
Expand Down Expand Up @@ -674,10 +678,6 @@ export namespace Version {
? 'https://files.minecraftforge.net/maven/' + lib.downloads.artifact.path
: 'https://libraries.minecraft.net/' + lib.downloads.artifact.path
}
if (info.classifier.startsWith('natives')) {
// new native format introduced by 1.19
return new ResolvedLibrary(info.name, info, lib.downloads.artifact, true)
}
return new ResolvedLibrary(lib.name, info, lib.downloads.artifact)
}
const maven = lib.url || 'https://libraries.minecraft.net/'
Expand Down

0 comments on commit 3cd7d19

Please sign in to comment.