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

Add Parchment mappings layer #138

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

MattSturgeon
Copy link
Member

@MattSturgeon MattSturgeon commented Dec 28, 2023

This PR adds parchment mappings.

Mojang's mappings cover class, method, & field names. Parchment builds on this by providing mappings for parameter names and some javadocs, though not nearly as much javadoc as yarn currently has.

I slightly over-complicated things by making the parchment minecraft version optional:

  • If parchment_version contains a hyphen, the first part is the minecraft version, appended to the artifact name.
  • If there's no hyphen, then the project minecraft_version is used instead.

This means when parchment has a release exactly matching the minecraft version we're using, we don't need to specify it twice.

For example, we are using 1.20.4, however Parchment has a stable build for 1.20.2 and unstable builds for 1.20.3. Therefore we currently need to specify two different mc versions.

If you don't think the complexity is worth it, I can remove the complexity and we'll always specify parchment's mc version explicitly.

We may also want to be able to disable parchment. We could do this by adding a check for project.parchment_version == "off" (or similar). Or we could comment the parchment line on an ad-hoc basis.

build.gradle Outdated Show resolved Hide resolved
@MattSturgeon MattSturgeon changed the title Add parchment mappings layer Add Parchment mappings layer Dec 28, 2023
`parchment_version` can be set to the plain version, if the parchment appendix matches `minecraft_version`. Otherwise, it should be formatted `appendix-version`.
Co-authored-by: Matt Sturgeon <[email protected]>
@hashalite hashalite merged commit fd986e5 into MinecraftFreecam:main Jan 4, 2024
@MattSturgeon MattSturgeon deleted the parchment branch January 4, 2024 07:32
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.

2 participants