Closed Tratnic closed 2 years ago
Thank you for the thorough investigation, it helped me a lot. I uploaded a new release and the issue should be fixed now.
Feel free to reopen if the issue is still present in the new release.
I should thank YOU for continuously developing this project. Now it works like a charm with the new Forge.
Just a nitpick, now usually two or more whitespace characters are used for separation, see:
Yep, i saw these chaotic spaces too afterwards, but was too lazy to remove them. Maybe someday later :)
Description of the current situation and why the new module-based Forge for 1.17 no longer works out of the box with Vortex Launcher
As everyone probably knows, just a few days ago Forge for version 1.17 was released. One of the biggest changes was the separation of FML from Forge again (like it was several years and versions ago), and along with that Forge has been based on a custom implementation on the relatively new Java 9+ module system (for more information for general users, for example, you can read this official announcement).
While the modularity sounds like a good future-proof idea, it made the current launching method used over the years not sufficient to properly launch the new module-based Forge for both the client and the server. This issue has been addressed by the Forge team differently for both the client and the server. Since Vortex Launcher is not a server launcher, I will talk here about the client solution only.
So from now on, it seems that the JSON manifest file that comes with Forge will look like this:![Forge-117-manifest](https://user-images.githubusercontent.com/87900825/126878912-c9d7db1b-460c-4704-9670-95aefa535694.png)
Array
game
is known to everyone, it has been there for years, and Vortex Launcher already makes use of it, butjvm
is brand new. It plays a very important role in version 1.17 and the new module-based Forge because without the parameters from there, it's impossible to properly launch the new module-based Forge for 1.17 at all. Vortex Launcher is not aware of the existence of the newjvm
array, so every user has to do some workarounds on their own.From what I have been able to determine and test:
${classpath}
here should be replaced with almost the same as the${classpath}
in the vanilla Minecraft JSON manifest file, except that in vanilla Minecraft at the end of the very long list of class paths there is a path to the main vanilla game JAR file (e.g.versions/1.17.1/1.17.1.jar
), while in Forge there is a path to Forge JAR file (e.g.versions/1.17.1-forge-37.0.5/1.17.1-forge-37.0.5.jar
).${library_directory}
should just becomelibraries
. There is no need to make it dynamic, similarly to how${assets_root}
is hardcoded toassets
in the Vortex Launcher source code.${classpath_separator}
should become either;
for Windows or:
for Unix-like systems.jvm
array should be treated exactly the same asgame
is already treated.Description of a workaround I've found that makes the new module-based Forge for 1.17 work with Vortex Launcher again
If by any chance you're here because you're looking for help launching the new module-based Forge for 1.17 through Vortex Launcher, you've come to the right place.
What you can do as a workaround to make it work:
~/.minecraft/versions/<Forge_version_string>
(e.g.~/.minecraft/versions/1.17.1-forge-37.0.5
) and open the only JSON manifest file that should be there (e.g.1.17.1-forge-37.0.5.json
) using your favorite text editor.jvm
array (it should look similar to the one shown above). From now on, only the contents of this array should interest you, nothing else, so whenever I talk about lines, I will always mean only these. Note: JSON array always begins with[
and ends with]
, so the contents that should interest you should be between the first[
and]
after the word "jvm"."
in the line, paste it into a new text file (e.g."I'm a sample text",
should becomeI'm a sample text
), and press Space to separate it from the next line you will deal with in the next step.${classpath}
,${library_directory}
, and${classpath_separator}
in the new text file.${classpath}
with the very long list of class paths that goes after-cp
when you launch Minecraft 1.17 with Forge. Unfortunately, I don't know an easy and simple way to get this list. The only way I know is to launch Minecraft 1.17 with Forge first, then (quickly?) get all the arguments that have been passed to the running Java process (how to do this depends on the system you use, and as I don't have an experience with each of them, you will probably have to do some research on your own on the Internet), and then copy the needed part only (i.e. the very long list of class paths that goes after-cp
). Now you can replace${classpath}
with what you just copied. The end result should be something like this (it's provided by me for reference only, do not copy it as it's something that changes with every Forge release!):${classpath}
with. There should be something likeversions/<Minecraft_version_number>/<Minecraft_version_number>.jar
. Replace it withversions/<Forge_version_string>/<Forge_version_string>.jar
where<Forge_version_string>
is exactly the same as in step 2 above (e.g.versions/1.17.1/1.17.1.jar
could be replaced withversions/1.17.1-forge-37.0.5/1.17.1-forge-37.0.5.jar
).${library_directory}
with justlibraries
.${classpath_separator}
with;
if you are on Windows, or with:
if you are on Unix-like systems. The end result should be something like this (it's provided by me for reference only, do not copy it as it contains OS-dependent things that changes with every Forge release and may also be changed by Mojang with any Minecraft update!):Note: The FML internals are not solid yet, and the Forge team is still figuring out how to make them as good as possible, so a breaking change may be introduced at some point and this workaround may stop working, so please keep it in mind.