mirror of
https://github.com/LegacyModdingMC/UniMixins.git
synced 2026-11-21 04:42:13 +00:00
docs: Add hot swap instructions, bump UniMix version [skip ci]
This commit is contained in:
1 parent
1336eb46b4
commit
478ea715d2
1 file changed
+20
-1
+20
-1
@@ -53,7 +53,7 @@ You can also depend on modules individually:
|
||||
```gradle
|
||||
dependencies {
|
||||
// One of these (note: this module doesn't have dev jars)
|
||||
implementation("com.github.LegacyModdingMC.UniMixins:-unimixins-mixin-1.7.10:$unimixinsVersion+unimix.0.12.0-mixin.0.8.5")
|
||||
implementation("com.github.LegacyModdingMC.UniMixins:-unimixins-mixin-1.7.10:$unimixinsVersion+unimix.0.12.1-mixin.0.8.5")
|
||||
//implementation("com.github.LegacyModdingMC.UniMixins:-unimixins-mixin-1.7.10:$unimixinsVersion+spongepowered.0.8.5")
|
||||
//implementation("com.github.LegacyModdingMC.UniMixins:-unimixins-mixin-1.7.10:$unimixinsVersion+fabric.0.12.4-mixin.0.8.5")
|
||||
//implementation("com.github.LegacyModdingMC.UniMixins:-unimixins-mixin-1.7.10:$unimixinsVersion+gasmix.0.8.5-gasstation_7")
|
||||
@@ -73,6 +73,25 @@ dependencies {
|
||||
}
|
||||
```
|
||||
|
||||
## Tricks
|
||||
|
||||
### Hot swapping
|
||||
|
||||
Mixin hot swapping can be enabled in a similar way to how it works on [Fabric](https://fabricmc.net/wiki/tutorial:mixin_hotswaps). You just have to add the UniMixins jar (or the matching UniMix jar) as a java agent.
|
||||
|
||||
Here's a buildscript snippet that will set it up for you (tested with the GTNH ExampleMod):
|
||||
|
||||
```gradle
|
||||
afterEvaluate {
|
||||
File uni = configurations.compileClasspath.findAll { it.name.contains("unimixins-all-") || it.name.contains("unimixins-mixin-") || it.name.contains("unimixins-0.") }.first()
|
||||
runClient {
|
||||
extraJvmArgs.add(
|
||||
'-javaagent:' + uni.getPath()
|
||||
)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Pitfalls
|
||||
|
||||
### Shaded ASM package name
|
||||
|
||||
Reference in new issue
Block a user