-
-
Notifications
You must be signed in to change notification settings - Fork 46
Allow custom modloader versions for auto curseforge #670
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
base: master
Are you sure you want to change the base?
Allow custom modloader versions for auto curseforge #670
Conversation
itzg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just wondering about combining.
src/main/java/me/itzg/helpers/curseforge/InstallCurseForgeCommand.java
Outdated
Show resolved
Hide resolved
|
Updated to use a single option rather than loader specific ones |
itzg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit pick remaining 😄
| String loaderVersion = parts.length == 2 ? parts[1] : parts[2]; | ||
|
|
||
| // Override with custom versions if provided | ||
| if (customModLoaderVersion != null) { | ||
| log.info("Overriding mod loader version from {} to {}", loaderVersion, customModLoaderVersion); | ||
| loaderVersion = customModLoaderVersion; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel pretty strongly about finals, so changing something to be un-final is almost a sin 😄
Now that the logic simpler, do it this way
| String loaderVersion = parts.length == 2 ? parts[1] : parts[2]; | |
| // Override with custom versions if provided | |
| if (customModLoaderVersion != null) { | |
| log.info("Overriding mod loader version from {} to {}", loaderVersion, customModLoaderVersion); | |
| loaderVersion = customModLoaderVersion; | |
| } | |
| final String loaderVersion; | |
| // Override with custom versions if provided | |
| if (customModLoaderVersion != null) { | |
| log.info("Overriding mod loader version from {} to {}", loaderVersion, customModLoaderVersion); | |
| loaderVersion = customModLoaderVersion; | |
| } | |
| else { | |
| loaderVersion = parts.length == 2 ? parts[1] : parts[2]; | |
| } |
Adds
--fabric-loader-version,--forge-version, and--neoforge-versionoptions to override modpack-declared modloader versions forinstall-curseforgecommand.Partial fix for itzg/docker-minecraft-server#2653
Relates to itzg/docker-minecraft-server#3759