Changes

429 bytes added ,  15:36, 6 October 2022
no edit summary
Line 1: Line 1:  
{{Under construction}} <!-- Guide for other IDEs is missing -->  
 
{{Under construction}} <!-- Guide for other IDEs is missing -->  
 
== What is Hot-swapping? ==
 
== What is Hot-swapping? ==
Hot-swapping is a feature letting you to see code/resource changes in-game without restarting it.
+
Hot-swapping is a feature letting you to swap-out parts of game without restarting it, allowing you to see resources and code changes quickly and tinker around with it more easily.
    
{{Tip|It is recommended that you run the game with debug mode in order to use hot-swapping, as code changes will only get applied under debug mode.}}
 
{{Tip|It is recommended that you run the game with debug mode in order to use hot-swapping, as code changes will only get applied under debug mode.}}
Line 18: Line 18:  
[[File:Debugmodeintellij.png]]
 
[[File:Debugmodeintellij.png]]
 
=== Hot-swapping code on Intellij Idea ===
 
=== Hot-swapping code on Intellij Idea ===
It's more simple then hot-swapping resources. After making changes to the code, just hit the build button. Then It will show you this message on bottom-left corner. If your mod project is big and it takes a long time to do so, hit <code>Build -> Recompile "currently opened file's name"</code>, this will only recompile file that is currently open. This option will not be visible if you don't have compile-able file opened. Files with extensions such as <code>.java</code> or <code>.kt</code> are compile-able.
+
It's more simple than hot-swapping resources. After making changes to the code, just hit the build button. Then It will show you this message on bottom-left corner. If your mod project is big and it takes a long time to do so, hit <code>Build -> Recompile "currently opened file's name"</code>, this will only recompile file that is currently open. This option will not be visible if you don't have compile-able file opened. Files with extensions such as <code>.java</code> or <code>.kt</code> are compile-able.
 
[[File:Hotswapmessage.png]]
 
[[File:Hotswapmessage.png]]
 
If you changed class's schematics then will show you error messages saying it is unsupported. Head to Applying schema changes section if you need to change schematics.
 
If you changed class's schematics then will show you error messages saying it is unsupported. Head to Applying schema changes section if you need to change schematics.
    
=== Applying schema changes ===
 
=== Applying schema changes ===
This requires more setup and specific find of JDK.
+
This requires more setup and specific find of JDK, Jetbrains Runtime (JBR). The reason why JBR is suggested is that it has [https://dcevm.github.io/ DCEVM](It allows class schema change in debug mode) by default and requires less configuration than other JDKs, such as hot-swap agent and IDE-specific plugins, etc. Although, there isn't exactly "installer" for it, you would have to download and unpack it manually.
 
      
==== Downloading JBR ====
 
==== Downloading JBR ====
Download Jetbrain runtime(JBR) with right java version and platform from here: https://github.com/JetBrains/JetBrainsRuntime/releases
+
Download JBR with right java version and platform from here: https://github.com/JetBrains/JetBrainsRuntime/releases
 
There are many different "flavors" but I recommend you downloading "JBR (vanilla)" one if you don't know what are these.
 
There are many different "flavors" but I recommend you downloading "JBR (vanilla)" one if you don't know what are these.
 
After downloading has finished unpack it into suitable location
 
After downloading has finished unpack it into suitable location
17

edits