Helpful JVM Arguments - antibang/BaerCraft GitHub Wiki

Disclaimer: please understand that I have only thoroughly tested these flags using BaerCraft. These should work with literally any modpack or MC version, but note that I am primarily only speaking for my modpack alone. The first flags mentioned are what I now use and have been recommending to many people, and so far, everyone has noticed a major improvement.

If you're unsure how to edit JVM flags, please refer to my page on how to this, both on CurseForge and the default Minecraft launcher (if you use MultiMC, I explain this here instead). If you notice any issues, like crashing, it is most likely because something you altered or added was put in incorrectly. If you copy and paste these directly, these settings should help your game run smoother if you're experiencing troubles with low FPS or lag. These should also help with people who are having some trouble just loading into the pack. If these do not help, either you do not have enough RAM allocated or your hardware is just not strong enough to run BaerCraft. *see disclaimer at the bottom

Want optimized video settings? Refer to this page as well.



Recommended JVM Arguments:

I've heard that Java arguments affect servers the most, blah blah blah or whatever, however from my experience and research, it can benefit the client just as much as well. These flags here are what I personally use and they have absolutely enhanced my game's performance on any launcher significantly.

These were put together by one of my friends/admins and myself, using Aikars flags as a base, but altered, added, and removed a couple of things to better suit modern modded Minecraft (pre-1.17).

While you DO NOT need to keep these flags at 12G, I do suggest keeping both numbers EQUAL TO EACH OTHER or else these flags WILL NOT FUNCTION AS INTENDED (i.e. if you want to allocate only 8GB of RAM, replace the -Xms12G -Xmx12G with -Xms8G -Xmx8G)

-Xms12G -Xmx12G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1NewSizePercent=15 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=30 -XX:G1HeapWastePercent=15 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=70 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs/ -Daikars.new.flags=true

*I should mention that I add the additional argument of -Xss4M in front of the -Xms12G -Xmx12G. I did not include this above because most of the time, it's unneeded or potentially stressful on hardware. You can add this additional flag at your own risk if you would like.

Aikars Flags:

Alternatively, if you wish to not use the above flags for some reason, or you are experiencing issues with them, you can try using Aikars flags which are probably the most well known JVM arguments for Minecraft. Everyone that I recommend these to, usually people with less than 8GB available to allocate to their profile, seem to be able to run BaerCraft a bit more smoothly, especially if you're running BaerCraft on CurseForge or any other third-party launcher. However, after using these flags for a long time myself on top of a bit of research, I've found that these flags are not exactly the best for modded Minecraft, but rather just simply vanilla MC and vanilla servers:

-XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:G1ReservePercent=20 -XX:+DisableExplicitGC -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCLiveThresholdPercent=90 -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -XX:G1HeapRegionSize=8M -XX:+UseG1GC -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=true -Daikars.new.flags=true -XX:+PerfDisableSharedMem

Here's a link explaining these arguments and a few other JVM related things - https://aikar.co/mcflags.html

This should not harm your PC/server, but just to be sure, you may need to tweak them to your server's or PC's need. Please monitor your PC's or server's resources just to be sure that it's not doing anything funky. Though, I can assure you that these are completely fine.


*You are fully responsible for any wear and tear on your PC components (though, you would have to really mess something up for this to happen with only the Minecraft and OptiFine options files, so don't worry). These settings I included will not harm your PC, however please monitor your computer's processes, memory, GPU, and temperatures while you're testing any type of settings.