Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • User Submitted Tutorials
  • [1.15.2-31.1.0] Intellij and Gradlew Forge Hotswap and DCEVM Tutorial
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 3
TheZombie1999

[1.15.2-31.1.0] Intellij and Gradlew Forge Hotswap and DCEVM Tutorial

By TheZombie1999, March 22, 2020 in User Submitted Tutorials

  • Reply to this topic
  • Start new topic

Recommended Posts

TheZombie1999    2

TheZombie1999

TheZombie1999    2

  • Tree Puncher
  • TheZombie1999
  • Members
  • 2
  • 5 posts
Posted March 22, 2020

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.

 

 

  • Thanks 2
  • Quote

Share this post


Link to post
Share on other sites

ZDoctor    3

ZDoctor

ZDoctor    3

  • Tree Puncher
  • ZDoctor
  • Members
  • 3
  • 27 posts
Posted April 19, 2020

Thanks for the how-to. Took a while to get it working even when reading this. I don't know if I would have had the patience to figure it out without it. XD Just a few notes.

 

1. You need to press 'Ok' on Intellij to apply changes to plugins. I definitely didn't spend 20 minutes trying to figure this out.

2. The vm option doesn't seem to be needed. The hot swap plugin didn't seem needed either. Was able to hotswap without both, but DCEVM needs to be installed.

3. Under Build the 'Build Project' and 'Recompile' option (and their shortcuts) works just fine, so no need to remap keys.

4. Everything other than installing DCEVM is unnecessary.

  • Quote

Share this post


Link to post
Share on other sites

RepubliCity    0

RepubliCity

RepubliCity    0

  • Tree Puncher
  • RepubliCity
  • Members
  • 0
  • 1 post
Posted April 22, 2020

Hey TheZombie1999, thanks for the guide but I'm really new to modding and I've just setup my development environment yesterday for the first time and I really need to be able to hotswap, it's really slowing me down to restart minecraft over and over again..

 

But I couldn't work this out, then I saw ZDoctor's comment then start over from scratch, removed everything I've installed and just installed DCVEM for java jdk 1.8.0_181 and jre 1.8.0_181. It is now installed but what's next? I should have to do something in order hotswap to work right? Something is missing and I don't know what to do. Even if It's correct I don't know how to hotswap either, I mean when I run the client if I make any changes how can I hotswap? Nothing happens when I click rebuild.

 

Sorry if this is a very dumb question but as I've said I'm pretty new to these things.

 

I've attached my runClient config.

 

Screenshot_14.png

  • Quote

Share this post


Link to post
Share on other sites

rawafel    0

rawafel

rawafel    0

  • Tree Puncher
  • rawafel
  • Members
  • 0
  • 1 post
Posted June 15, 2020
On 4/22/2020 at 12:55 PM, RepubliCity said:

Hey TheZombie1999, thanks for the guide but I'm really new to modding and I've just setup my development environment yesterday for the first time and I really need to be able to hotswap, it's really slowing me down to restart minecraft over and over again..

 

But I couldn't work this out, then I saw ZDoctor's comment then start over from scratch, removed everything I've installed and just installed DCVEM for java jdk 1.8.0_181 and jre 1.8.0_181. It is now installed but what's next? I should have to do something in order hotswap to work right? Something is missing and I don't know what to do. Even if It's correct I don't know how to hotswap either, I mean when I run the client if I make any changes how can I hotswap? Nothing happens when I click rebuild.

 

Sorry if this is a very dumb question but as I've said I'm pretty new to these things.

 

I've attached my runClient config.

 

Screenshot_14.png

 

same nothing happened :(

  • Quote

Share this post


Link to post
Share on other sites

skybber    0

skybber

skybber    0

  • Tree Puncher
  • skybber
  • Members
  • 0
  • 1 post
Posted June 26, 2020

Hi, I'm current dcevm8/11 maintainer and my son is keen Minecraft player. Is the java8 edition still relevant for Minecraft developers? I can port G1 garbage collector with some hotswap performance optimizations from java11(dcevm11) to java8(dcevm8), if the community is interested in.

 

Btw, current dcevm11 is at https://github.com/TravaOpenJDK/trava-jdk-11-dcevm , optimized with another new features at https://github.com/TravaOpenJDK/trava-jdk-11-dcevm-staged

  • Quote

Share this post


Link to post
Share on other sites

EmberQuill    0

EmberQuill

EmberQuill    0

  • Tree Puncher
  • EmberQuill
  • Members
  • 0
  • 1 post
Posted July 24, 2020 (edited)
On 6/26/2020 at 4:07 PM, skybber said:

Hi, I'm current dcevm8/11 maintainer and my son is keen Minecraft player. Is the java8 edition still relevant for Minecraft developers? I can port G1 garbage collector with some hotswap performance optimizations from java11(dcevm11) to java8(dcevm8), if the community is interested in.

 

Btw, current dcevm11 is at https://github.com/TravaOpenJDK/trava-jdk-11-dcevm , optimized with another new features at https://github.com/TravaOpenJDK/trava-jdk-11-dcevm-staged

It's definitely still relevant for Minecraft mod development. I don't think Minecraft Forge officially supports anything newer than Java 8 yet.

Edited July 25, 2020 by EmberQuill
  • Quote

Share this post


Link to post
Share on other sites

urbanxx001    8

urbanxx001

urbanxx001    8

  • Creeper Killer
  • urbanxx001
  • Members
  • 8
  • 139 posts
Posted September 30, 2020
On 4/22/2020 at 6:55 AM, RepubliCity said:

I mean when I run the client if I make any changes how can I hotswap? Nothing happens when I click rebuild.

Same thing for me... I've tried with both the hotswap plugin and without, and no changes occur. I've verified everything is setup correctly. Also not sure of the difference between "Recompile" under Build, and "Reload Changed Classes" under debug actions (I assume it makes no difference in debug mode?). Or if only certain changes are detected during runtime. 

  • Quote

Share this post


Link to post
Share on other sites

apollos    0

apollos

apollos    0

  • Tree Puncher
  • apollos
  • Members
  • 0
  • 4 posts
Posted October 14, 2020 (edited)

Hi, thank you for sharing the tutorial I will try it.

TweakBox Tutuapp
Edited November 24, 2020 by apollos
  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 3
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • e2rifia
      (1.16.2) Making a new capability (3)

      By e2rifia · Posted 4 minutes ago

      Is @EventBusSubscriber what's getting in the way of setup?
    • diesieben07
      (1.16.2) Making a new capability (3)

      By diesieben07 · Posted 10 minutes ago

      You don't need to, no. Why?
    • e2rifia
      (1.16.2) Making a new capability (3)

      By e2rifia · Posted 12 minutes ago

      I should separate @Mod and @EventBusSubscriber?
    • diesieben07
      (1.16.2) Making a new capability (3)

      By diesieben07 · Posted 18 minutes ago

      @EventBusSubscriber subscribes to the forge bus by default, but FMLCommonSetupEvent is fired on the mod bus.     Please use the code format when posting code.
    • e2rifia
      (1.16.2) Making a new capability (3)

      By e2rifia · Posted 21 minutes ago

      @Mod(Main.MODID) @Mod.EventBusSubscriber(modid = Main.MODID) public class Main{     public static final String MODID = "main"; @SubscribeEvent      public static void setup(final FMLCommonSetupEvent event) {         System.out.println("I'm setting up!");         MinecraftForge.EVENT_BUS.register(new CapabilityAttatcher());         MagicCapability.register();     } }  
  • Topics

    • e2rifia
      10
      (1.16.2) Making a new capability (3)

      By e2rifia
      Started 2 hours ago

    • Heinzchen
      2
      Update mod to 1.16.5

      By Heinzchen
      Started 14 hours ago

    • Klarks
      10
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks
      Started 14 hours ago

    • XenoPyax
      3
      [1.16.4] Render Player in gui

      By XenoPyax
      Started 3 hours ago

    • metword
      16
      [1.16.4] Config file will not update.

      By metword
      Started Wednesday at 04:20 PM

  • Who's Online (See full list)

    • loordgek
    • Danebi
    • diesieben07
    • e2rifia
    • Choonster
    • Heinzchen
    • Pl00py_R
    • Klarks
    • jdawg3636
  • All Activity
  • Home
  • Mod Developer Central
  • User Submitted Tutorials
  • [1.15.2-31.1.0] Intellij and Gradlew Forge Hotswap and DCEVM Tutorial
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community