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 fabric-api to meta #10

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

Conversation

dexman545
Copy link

Adds fabric-api to meta so that launchers such as MultiMC and potentially fabric-installer can provide an option to install fabric-api along with loader.

Comment on lines 12 to 29
this.version = version;

// Fix old API versions not having MC version
// Recreated from curseforge version index
if (version.contains("0.3.1") || version.contains("0.3.0")) {
version = version + "-1.14";
}

if (version.contains("+build.")) {
//TODO legacy remove when no longer needed
this.minecraftVersion = version.substring(version.lastIndexOf('-'));
this.apiVersion = version.substring(0, version.lastIndexOf('+') - 1);
this.build = Integer.parseInt(version.substring(version.lastIndexOf("+build.")+7, version.lastIndexOf('-')));
} else {
this.minecraftVersion = version.substring(version.lastIndexOf('+'));
this.apiVersion = version.substring(0, version.lastIndexOf('+') - 1);
this.build = 999; // Build number is no longer appended to versions, use dummy version
}
Copy link
Member

Choose a reason for hiding this comment

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

This isnt going to be accrate and it needs to be if provided via an api. I've been over this a few times in detail in discord.

The only way to provide good data is to have a manually managed database of what mc versions fabric api will work with. Some API versions work across a number of versions (Think pre-releases espeacially). this seems to just be using the branch provided in the version witch doesnt help decided between 1.16.1 and 1.16.2 in any way.

If launchers/installers are going to install fabric api they need to be 100% sure its going to work, this doesnt provide that.

Copy link
Author

@dexman545 dexman545 Dec 30, 2020

Choose a reason for hiding this comment

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

Where should this database exist, and how should it be added to?

Example in progress mc->api: https://gist.github.com/dexman545/478d9ca5598a48ed2960fbb5d06ef0be

@dexman545
Copy link
Author

Added a map of mc->api. For testing, it uses the file in a gist: https://gist.github.com/dexman545/478d9ca5598a48ed2960fbb5d06ef0be

TODO: host the file somewhere better and automate updating it.
TODO: finish adding api versions (list of mc versions without an API version are listed in a second file of the gist)

After talking with peterix, they seemed warranted. System is extensible and hashes could be added to the other files in meta.
Implementation may be poor.
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