1
0
Fork 0
mirror of https://github.com/zaaarf/lillero-mixin.git synced 2025-02-03 08:33:54 +01:00
Lillero ASM patches via Sponge's Mixin https://docs.zaaarf.foo/lillero-mixin/
Find a file
2025-01-20 02:18:23 +01:00
.github/workflows ci: add ci 2025-01-20 02:17:08 +01:00
gradle/wrapper feat: initial (broken) commit 2024-01-24 17:59:00 +01:00
src/main/java/ftbsc/lll/mixin feat: working implmentation at last 2025-01-20 01:20:49 +01:00
.editorconfig feat: initial (broken) commit 2024-01-24 17:59:00 +01:00
.gitignore feat: initial (broken) commit 2024-01-24 17:59:00 +01:00
build.gradle feat: working implmentation at last 2025-01-20 01:20:49 +01:00
gradlew feat: initial (broken) commit 2024-01-24 17:59:00 +01:00
gradlew.bat feat: initial (broken) commit 2024-01-24 17:59:00 +01:00
LICENSE feat: initial (broken) commit 2024-01-24 17:59:00 +01:00
README.md docs: provide actual example 2025-01-20 02:18:23 +01:00

Lillero-mixin

Lillero-mixin is a Mixin plugin capable of applying Lillero ASM patches without needing to inject itself as a JAR library. While slightly dirtier code-wise, this has the key advantage over the older Lillero-loader of being compatible with both Forge and Fabric - and, barring major API changes, with any other future mod loader that will try to force Mixin on you.

How to use

  1. Get this as well as the core into your game classpath. The easiest way is to bundle them together with your mod.
  2. Write an empty class or interface with a @Mixin annotation listing all the classes that will be modified.
    • If you are using the processor, this step is considerably simpler; just pass the fakeMixin compiler argument with the fully qualified name you wish the class to have.
  3. Write an appropriate Mixin configuration, specifying the empty Mixin you generated or wrote, and LilleroMixinPlugin as plugin. A minimal example (for Fabric) is provided below:
{
  "required": true,
  "package": "ftbsc.lll.mixin.fake",
  "plugin": "ftbsc.lll.mixin.LilleroMixinPlugin",
  "mixins": ["FakeMixin"]
}

All that's left to do at this point is to tell your mod loader to use that Mixin configuration file; if you are unsure now how to do this, refer to your mod loader's docs.

Credits

Lillero-mixin is standing on the shoulders of giants. While my implementation is definitely cleaner, I would've never thought of this had I not stumbled on Manningham Mills (AKA Fabric-ASM). So, big thanks to Chocohead for proving it was possible!