Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对versionManifest.json和version.json的解析 #32

Closed
wants to merge 5 commits into from

Conversation

whitecat346
Copy link
Contributor

@whitecat346 whitecat346 commented Feb 7, 2025

version manifest.json是用于查询版本信息的清单文件,供启动器查询所有版本的信息并下载version.json文件
version.json是用于查询单个版本信息的清单文件,供启动器下载某个特定的游戏版本。

存储的实体类过长,这里不作说明,和对应的json文件内容保持一致(可能有部分出入,建议使用时配合源代码)

version.json的解析器入口在PCL2.Neo.Models.Minecraft.McVersion.VersionFileParser.Parer(),为public static VersionData.VersionData Parser(string input)。其中传入参数input为文件的内容,可以使用System.IO.File.ReadAllText()获取。在调用后会返回VersionData,用来访问解析后的数据(就像使用了JsonSerializer.Deserialize一样)

@whitecat346 whitecat346 closed this Mar 1, 2025
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.

1 participant