Conversation
…ives The way we used to pass extra jars which may contain mods to Forge, via its `--mods` argument, only accepts relative paths, and on Windows it is impossible to construct a relative path when the two paths are on different drive letters. This commit now instead uses our existing RelaunchTransformer to modify the code in Forge which parses the `--mods` argument, to manually inject the absolute paths to any such extra mods right after the regular `--mods` parsing.
Traben-0
approved these changes
Feb 18, 2026
Traben-0
left a comment
There was a problem hiding this comment.
TIL what sic means lol
lgtm, its just now using a system property rather than passing them in as args due to a forge issue
| while (ret.getOpcode() != Opcodes.ARETURN) { | ||
| ret = ret.getPrevious(); | ||
| } | ||
| instructions.insertBefore(ret, new InsnNode(Opcodes.DUP)); |
There was a problem hiding this comment.
Nit: looks like there is a sort() run on the list prior to its return in the original method, which i think this messes up, I doubt it's important, but it is a behavioral difference
Contributor
Author
There was a problem hiding this comment.
Yeah, I'm guessing it's just so mod loading order doesn't depend on file system iteration order. And since we also sort our mod list, that should still be the case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The way we used to pass extra jars which may contain mods to Forge, via its
--modsargument, only accepts relative paths, and on Windows it is impossible to construct a relative path when the two paths are on different drive letters.This commit now instead uses our existing RelaunchTransformer to modify the code in Forge which parses the
--modsargument, to manually inject the absolute paths to any such extra mods right after the regular--modsparsing.