This is a small guide for people how want to Speed up their development by swapping changed code during run time, which eliminates the need to constantly restart the Minecraft-Client.
To reach our goal we need to install Hotswap and DCEVM.
To install DCEVM you first need to download the newest release for java 8 form this link:
https://github.com/dcevm/dcevm/releases
Before you continue installing DCEVM you need to first install the right java version that matches your download. Most likely this will be the version 1.8.0_181.
The download list can be found here:
https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
To now install DCEVM run java -jar "path_to_the_installer/DCEVM-8u181-installer.jar" as Administrator in your console.
In the UI that pops up you need to select the java version you just installed and click on Install DCEVM as altjvm. You probably need to do this for the jdk and jre.
Next download the hotswap-agent and place the jar file in an appropriate folder.
https://github.com/HotswapProjects/HotswapAgent/releases
Now the Basic setup is finished, our next step is too setup Intellij and gradle two run correctly.
First thing you need to do is to install the HotswapAgent plugin for Intellij.
Plugins can be install under: Settings -> Plugins -> Marketplace
Search for hotswapagent.
Now under Tools -> HotswapAgent select Enable HotswapAgent in all configurations
Under Keymap search for "Reload Changed Classes" and assign a Keyboard shortcut.
Now press double shift and search for "Registry..."
and enable compiler.automake.allow.when.app.running
Finally to run the Minecraft client create a new gradle configuration
with task = "runClient"
and VM options = "-Xmx3G
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5010
-XXaltjvm=dcevm
-XX:+UnlockExperimentalVMOptions
-javaagent:path_to_your\hotswap-agent-1.4.0.jar"
Now your good to go.
If you have any questions or suggestions feel free to comment below this is my first tutorial so
if you have any advise it would be more than welocome.
I hope this is helpful for you have a nice Day.