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

Fix old server version parsing #633

Merged
merged 2 commits into from
Mar 29, 2022

Conversation

js6pak
Copy link
Contributor

@js6pak js6pak commented Mar 27, 2022

Strips the starting message from the version string

Examples of strings in old server versions

1.0.0 - Starting minecraft server version 1.0.0

b1.7.3 - Starting minecraft server version Beta 1.7.3
b1.0 - Starting minecraft server version Beta 1.0

a0.2.8 - Starting minecraft server version 0.2.8
a0.1.0 - Starting minecraft server version 0.1.0

Afaik there is no way to extract the version from classic server jars

Problem with alpha

Alpha server versions are independent from client versions and have a leading zero which the version regex doesn't support

(cherry picked from commit 04b3c8e)
@sfPlayer1
Copy link
Contributor

If it isn't possible to infer the correct version id as used by launchermeta from these strings directly, it may be appropriate to have a hardcoded translation table (Map) for all weird cases.

Please add some more comments around which versions use the various code paths and why, including examples (something like // used by MC beta 1.0-1.7.3 dedicated server: Starting minecraft server version Beta 1.7.3)

@js6pak
Copy link
Contributor Author

js6pak commented Mar 28, 2022

All versions before 1.2.5 don't have the server included in launchermeta. Only way to get those is betacraft's server archive and omniarchive index

And it's not really possible to translate alpha server versions to clients because there were multiple server releases with the same protocol version and no client counterpart, and vice versa
So I guess the only way to go about it is to treat server & client independently and allow leading zero in alpha version regex

@js6pak js6pak marked this pull request as ready for review March 28, 2022 14:26
@sfPlayer1 sfPlayer1 merged commit 29b38f7 into FabricMC:master Mar 29, 2022
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.

None yet

2 participants