FreeLauncher icon indicating copy to clipboard operation
FreeLauncher copied to clipboard

Profile's JVM arguments are ignored when launching VersionManifestType.V2 .

Open dedepete opened this issue 5 years ago • 3 comments

dedepete avatar Aug 29 '18 19:08 dedepete

image Этот баг относится к проблеме некорректной работы поля "рабочая директория"? При задании в профиле папки с клиентом, отличной от ..Roaming/.minecraft данные все равно привязаны к .Roaming/.minecraft К примеру не читалась версия с forge на картинке, пока я не поместил свою копию клиента в .Roaming/.minecraft Этот баг сильно мешает пользоваться системой профилей при использовании нескольких разных версий/сборок, разделенных разными расположениями в файловой системе!

gromex avatar Feb 19 '19 23:02 gromex

If this issue results in not passing the arguments entered into the "JVM Flags" field to the Java VM, I can say that I'm able to reproduce this behavior on FreeLauncher 0.2.4, but it depends on the selected Minecraft version. I tested the following ones: 1.14, 1.13.2, 1.13, 1.12.2, 1.11.2, 1.10.2, 1.9.4, 1.8.9, 1.7.10 and 1.6.4 (going below 1.6.4 is not necessary, I think, since those versions weren't designed for the "new" versions system). With these Minecraft versions up to 1.12.2 everything work fine – entered arguments are passed correctly. When you select version newer than 1.12.2, the arguments miss in action, which can result in JVM not allocating enough RAM to be able to run Minecraft correctly (this occurs on my PC, see screenshot below). Additionally, since this issue is no longer 1.13-exclusive (it also occurs in 1.14 and will probably occur in 1.15), I'd suggest removing the "low priority" label.

@gromex I think your issue with profile directory is something different. If I'm right, I'd suggest you creating another issue here, on GitHub.

Problem with insufficient RAM: Minecraft-1-14-out-of-mem

La1eon avatar May 12 '19 13:05 La1eon

If someone is interested in a workaround for this issue, please look below to my solution I found.

To deal with this issue, you will need any text editor to open and edit specific JSON file. Note: Text in this file doesn't use line endings, so it's fine if you see everything in one line or 1 line split into 10 (even when you use Notepad on Windows older than Windows 10 1809, which doesn't support LF line endings). Next thing is to have already downloaded version you want to fix. It's necessary to do it before we can start, because this my workaround is version-specific (it fixes only specific version, not all at once).

If everything is done, we can start. Firstly, you have to navigate to ~\.minecraft\versions\1.x.y, where "x" and "y" are Minecraft version numbers. Then you have to find the JSON file – 1.x.y.json (x, y have the same meaning as before) – and open it using the text editor of your choice. If you did it, in this file locate the same part, especially the highlighted one, as on the screenshot below. Then you can add your preferred JVM arguments after -XX:HeapDumpPath=MojangTricks... and just before the nearest quotation mark. I mean something like this:

"value": "-XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M"

After that you have to save this file. And done! You can play on Minecraft versions newer than 1.12.2 with your preferred JVM arguments.

Screenshot showing pretty-printed default JSON code (from Minecraft 1.14): JVM-args-in-the-JSON-file

La1eon avatar May 13 '19 07:05 La1eon