Investigate manual ASM stack frame generation where reasonable
Kobata opened this issue ยท 0 comments
See #541 (comment)
ASM's COMPUTE_FRAMES function in some situations requires knowledge of the common superclass of a set of classes, which it implements by loading those classes and using reflection, which doesn't work very well with Forge's implementation of transformers.
With the possible exception of the patch for textbox support, however, all edits done by Inventory Tweaks are either new methods or complete replacement of the original bytecode of a method, meaning that there is no real need to generically recompute all stack frames in the class (the originals are still fine), but in such a case there would be the need to emit the information directly into the new/edited methods.
Luckily they're all fairly simple and such information shouldn't be hard to synthesize, but this would require looking into how to do so and what the information for these methods would need to look like.