User Tools

Site Tools


tutorial:mixin_hotswaps

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:mixin_hotswaps [2024/06/30 00:11] – add hint to vm option bananatutorial:mixin_hotswaps [2026/03/24 17:30] (current) – Redirect to Docs page gauntrecluse
Line 1: Line 1:
 +~~REDIRECT>https://docs.fabricmc.net/develop/getting-started/intellij-idea/launching-the-game#hotswapping-mixins~~
 +
 ====== Hotswapping Mixins ====== ====== Hotswapping Mixins ======
 Mixins can't be hot-swapped in a default Fabric environment. To enable this functionality, you'll have to specify the ''-javaagent'' flag inside your VM options.   Mixins can't be hot-swapped in a default Fabric environment. To enable this functionality, you'll have to specify the ''-javaagent'' flag inside your VM options.  
Line 6: Line 8:
 {{https://i.imgur.com/fUrhss5.png}} {{https://i.imgur.com/fUrhss5.png}}
  
-Copy the full path to the jar and open up your run configurations. Under ''Minecraft Client'', expand the VM options tab. You'll need to set the ''-javaagent'' flag to the path of the mixin jar:+Copy the full path to the jar and open up your run configurations. Under ''Minecraft Client'', expand the VM options tab. You'll need to set the ''-javaagent'' flag to the path of the mixin jar.
  
-{{https://i.imgur.com/SuW9MlV.png}}+Optionally, you can add the ''-XX:+AllowEnhancedClassRedefinition'' flag to enable parameters to be changed, and fields or methods to be added/removed:
  
-Run your game in debug mode. You can now reload mixins using the same rules as normal: +{{https://i.imgur.com/SuW9MlV.png}}
-  * no adding or removing methods +
-  * no changing method parameters +
-  * no adding or removing fields+
  
 You can do these things if you also add the ''-XX:+AllowEnhancedClassRedefinition'' VM option. You can do these things if you also add the ''-XX:+AllowEnhancedClassRedefinition'' VM option.
tutorial/mixin_hotswaps.1719706315.txt.gz · Last modified: 2024/06/30 00:11 by banana