User Tools

Site Tools


tutorial:hotswapping

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorial:hotswapping [2024/07/04 16:31] mineblock11tutorial:hotswapping [2024/11/03 17:26] (current) – [Hotswapping Mixins] modmuss50
Line 4: Line 4:
 Restarting Minecraft can take a hefty amount of time. Thankfully, there are tools that allow you to apply some changes while the game is running, also called hotswapping. Restarting Minecraft can take a hefty amount of time. Thankfully, there are tools that allow you to apply some changes while the game is running, also called hotswapping.
  
-==== Reload changed classes ====+===== Reload changed classes =====
 In Eclipse or IntelliJ IDEA, run Minecraft in debug mode. To apply changes in code, click the "Build" button in IntelliJ IDEA or save in Eclipse. In Eclipse or IntelliJ IDEA, run Minecraft in debug mode. To apply changes in code, click the "Build" button in IntelliJ IDEA or save in Eclipse.
 Note: this only allows you to change method bodies. If you do any other kind of change, you will have to restart. Note: this only allows you to change method bodies. If you do any other kind of change, you will have to restart.
Line 11: Line 11:
  
 {{https://i.imgur.com/SuW9MlV.png}} {{https://i.imgur.com/SuW9MlV.png}}
 +
 +===== Reload resources =====
  
 ==== Reload assets ==== ==== Reload assets ====
Line 17: Line 19:
 ==== Reload data ==== ==== Reload data ====
 You can apply any changes made in the ''data/'' directory such as recipes, loot tables and tags by rebuilding the project and then using the in-game command ''/reload''. More specifically, this reloads anything the mod provides as a data pack. You can apply any changes made in the ''data/'' directory such as recipes, loot tables and tags by rebuilding the project and then using the in-game command ''/reload''. More specifically, this reloads anything the mod provides as a data pack.
 +
 +===== Hotswapping Mixins =====
 +
 +You can also hotswap mixins by using Mixin Java agent. For how to achieve that, see [[https://docs.fabricmc.net/develop/getting-started/launching-the-game#hotswapping-mixins|Fabric Docs page]] and [[mixin_hotswaps]].
tutorial/hotswapping.1720110697.txt.gz · Last modified: 2024/07/04 16:31 by mineblock11