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 loader-style smever format MC versions #11

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

dexman545
Copy link

Add a semver entry to v2/versions/game and create a v2/versions/game/:game_version endpoint.

Allows external tools to convert an MC version* to something semver compliant for parsing.

Useful for tools such as modmuss.me/fabric.html to include an entry for use in fabric.mod.json as it is not always immediately obvious how loader will translate the version for enforcement.

  • Combat snapshots no included.

@modmuss50
Copy link
Member

The docs (readme) need updating as well.


public static class Meta {

String assets;
Copy link
Member

Choose a reason for hiding this comment

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

Im not sure the asset id always matches the target.

Copy link
Author

Choose a reason for hiding this comment

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

I haven't seen a case where it hasn't.
Here's the output it generates: https://gist.github.com/dexman545/4ad16ef4e1de9d10f9042b54fc5fd8ab

src/main/java/net/fabricmc/meta/web/EndpointsV2.java Outdated Show resolved Hide resolved
@modmuss50
Copy link
Member

20w30a seems wrong (without checking) should be 1.16.2

Replace stream with for-loop
refactor getMajorVersion -> getTargetVersion
@dexman545
Copy link
Author

20w30a seems wrong (without checking) should be 1.16.2

It is, will look into it

@dexman545
Copy link
Author

Talked briefly about in discord;
How to handle cases like 20w30a where loader's semver output is based on the actual jar and not metadata.
Downloading the jars is likely too much.

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