Skip to content

Comments

feat: 旧版本支持#72

Merged
AnemoFlower merged 10 commits intoCeciliaStudio:mainfrom
AnemoFlower:feature/old-versions-support
Feb 11, 2026
Merged

feat: 旧版本支持#72
AnemoFlower merged 10 commits intoCeciliaStudio:mainfrom
AnemoFlower:feature/old-versions-support

Conversation

@AnemoFlower
Copy link
Member

@AnemoFlower AnemoFlower commented Feb 9, 2026

本 PR 为 1.12.2 及以下的版本提供了支持。
closes #61 , fixes #70 .

@AnemoFlower AnemoFlower marked this pull request as draft February 9, 2026 02:06
@AnemoFlower
Copy link
Member Author

建议在客户端清单加载失败时,在版本列表中显示为“错误的版本”。

@AnemoFlower AnemoFlower marked this pull request as ready for review February 11, 2026 02:27
@AnemoFlower AnemoFlower requested a review from Copilot February 11, 2026 02:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for older Minecraft versions (1.12.2 and below) by implementing native library architecture mapping and updating the manifest parsing logic to handle legacy format differences. Additionally, it fixes a bug where installation progress could become negative when content length is unknown.

Changes:

  • Adds NativesMapper utility to remap LWJGL and JNA libraries for different CPU architectures (arm64/x64)
  • Updates ClientManifest to parse legacy minecraftArguments field and provide defaults for optional fields (javaVersion, logging)
  • Implements native library extraction for older Minecraft versions that require it
  • Fixes progress calculation bug by checking for positive values instead of non-zero values
  • Adds error instance tracking to display instances with unsupported manifest formats

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
PCL.Mac.Core/Utils/NativesMapper.swift New utility to map native libraries (LWJGL, JNA) to architecture-specific versions for old Minecraft compatibility
PCL.Mac.Core/Utils/MavenCoordinateUtils.swift New utility for parsing Maven coordinates and generating artifact paths
PCL.Mac.Core/Models/ClientManifest.swift Added support for legacy minecraftArguments format, optional field defaults, and library replacement method
PCL.Mac.Core/Task/MinecraftInstallTask.swift Added extractNatives step for old versions, uses mappedManifest for downloads while preserving original manifest
PCL.Mac/Task/MinecraftLaunchTask.swift Integrates NativesMapper, clears natives directory before launch, passes manifest to completeResources
PCL.Mac.Core/Minecraft/MinecraftRepository.swift Tracks error instances separately to display unsupported manifests in UI
PCL.Mac.Core/Minecraft/MinecraftInstance.swift Moves automatic Java selection to init method
PCL.Mac.Core/Services/JavaSearcher.swift Makes IMPLEMENTOR field optional with default value for compatibility
PCL.Mac.Core/Utils/Download/DownloadItem.swift Adds Hashable conformance to enable deduplication
PCL.Mac.Core/Utils/Download/MultiFileDownloader.swift Deduplicates download items using Set to prevent duplicate downloads
PCL.Mac.Core/Utils/Download/DownloadDelegate.swift Fixes negative progress bug by checking totalBytesExpectedToWrite > 0 instead of != 0
PCL.Mac.Core/Models/VersionManifest.swift Simplifies ordinal calculation to return index directly
PCL.Mac/ViewModels/MinecraftDownloadPageViewModel.swift Caches version manifest to disk for offline use
PCL.Mac/Views/Launch/InstanceList/InstanceListPage.swift Displays error instances and sorts instances by version
PCL.Mac/Assets.xcassets/VersionIcons/RedstoneBlock.imageset/* Adds RedstoneBlock icon for error instances
PCL.Mac.Tests/Minecraft/MinecraftLaunchTests.swift Comments out explicit Java path to rely on automatic detection

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AnemoFlower AnemoFlower merged commit 0ed0fd6 into CeciliaStudio:main Feb 11, 2026
1 check passed
@AnemoFlower AnemoFlower deleted the feature/old-versions-support branch February 11, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Minecraft 安装进度会变成负数 [Feature] 支持更多 Minecraft 版本

1 participant