Currently FG7 supports AccessTransformers and Facade through dedicated code paths that run against the Minecraft dependency, along with a separate AT Gradle plugin for applying ATs to other dependencies.
I'd like to request the ability to transform my own mod code at build-time, ideally with some kind of API exposed so that anyone can write a build-time transformer to apply to their own mods. The API should give me the original source file, the compiled bytecode (ClassFile API ClassModel?) and a way of changing the bytecode for each class I'm interested in.
There's this plugin as an existing solution, but it doesn't work with module-info files, relies on JDK internals and uses an ASM visitor API which I'm not keen on.
This would make some global runtime transformers unnecessary and expand what mods could do by allowing direct access to JVM-exclusive features.
Currently FG7 supports AccessTransformers and Facade through dedicated code paths that run against the Minecraft dependency, along with a separate AT Gradle plugin for applying ATs to other dependencies.
I'd like to request the ability to transform my own mod code at build-time, ideally with some kind of API exposed so that anyone can write a build-time transformer to apply to their own mods. The API should give me the original source file, the compiled bytecode (ClassFile API
ClassModel?) and a way of changing the bytecode for each class I'm interested in.There's this plugin as an existing solution, but it doesn't work with module-info files, relies on JDK internals and uses an ASM visitor API which I'm not keen on.
This would make some global runtime transformers unnecessary and expand what mods could do by allowing direct access to JVM-exclusive features.