modlauncher icon indicating copy to clipboard operation
modlauncher copied to clipboard

Allow ILaunchPluginService to filter handling classes based on constant pool

Open embeddedt opened this issue 2 years ago • 0 comments

This PR introduces a new constantsFilter method on ILaunchPluginService. The intent of this is to allow transformers like RuntimeDistCleaner to be implemented more efficiently, by skipping parsing of the class file if the constant pool does not contain a given byte sequence. This should work because if the Dist annotation were to be present in the class, it would have to be in the constant pool.

Using this feature is optional and existing ILaunchPluginService implementations will continue to work as before without changes.

embeddedt avatar Dec 14 '23 16:12 embeddedt