mcaselector icon indicating copy to clipboard operation
mcaselector copied to clipboard

making custom filters more powerful

Open arvitus opened this issue 1 year ago • 0 comments

As far as I know, the custom filters are currently limited to groovy and java builtin classes and the NBT library, not allowing for json read/write operations on files for example.

This PR aims to solve that. It implements the possibility to make custom import statements based on the libraries that mca uses. (Maybe even past that) Instead of only being able to write the code that is put inside the filter function, you can now define the filter function itself inside of the custom filter, allowing for imports before that definition.

This is also useful for extending the custom filter functionality even more, for example by adding some kind of hook functions "before" and "after" that will be called once before the filtering process starts and after it ends. That way one could define all those three functions in the custom filter, making it even more powerful.

arvitus avatar Aug 29 '23 12:08 arvitus