VanillaGradle icon indicating copy to clipboard operation
VanillaGradle copied to clipboard

Provide Mixin as an optional project configuration

Open Zidane opened this issue 4 years ago • 4 comments

Not looking for this project, outside of something optional, to be a mod development kit but since Mixin is so popular, we should provide a "path of least resistance" to getting Mixin up and manipulating classes.

Could replace MixinGradle usage in it's entirety for SpongeVanilla's usecase.

Zidane avatar Jan 28 '21 19:01 Zidane

If I recall, I think you had some ideas here @zml2008 .

Zidane avatar Jan 28 '21 19:01 Zidane

We don't do any remapping yet, so I don't think we'd get much benefit out of the AP, but what this submodule could do would be:

  • Create the separate mixin/accessor source sets
  • Configure the Mixin java agent on run configurations

Eventually, this could be extended to provide an obfuscation service for the Mixin AP to use.

zml2008 avatar Jan 28 '21 22:01 zml2008

Another feature that would be nice: add a gradle task to automatically sort Mixin class names alphabetically in the src/*/resources/*.mixins.json files

zml2008 avatar Mar 17 '21 03:03 zml2008

A further potentially useful tool:

Generate a diff from vanilla decompile to the classes produced by -Dmixin.debug.export=true

This would:

  • execute some run task with the export enabled
  • run the decompiler on those files with appropriate classpath
  • diff to the existing vanilla sources

zml2008 avatar Dec 18 '22 22:12 zml2008