PatchworkMC / patchwork-patcher

Patches Forge mod jars, allowing them to be loaded by Fabric
GNU Lesser General Public License v3.0
316 stars 33 forks source link

Add more kinds of redirect transformers #85

Closed TheGlitch76 closed 3 years ago

cittyinthecloud commented 3 years ago

Another transformer that could be nice (thinking in the case of the runtime remapping of reflection) would be taking a virtual method call and turning it into a static one.

clazz.getDeclaredField("foobar")

to 

PatchworkReflection.getDeclaredField(clazz, "foobar")

Could also be useful for instances where we might need to emulate side effects that Forge mods expect themselves to have, but might break Fabric mods.