Don't use MCreator. ever. It was a great concept, but it was horribly made. Really, really, really badly implemented. I'm planning on making my own API (that might have its own program to make stuff) that provides similar functionality.
Registry events haven't been new for a long time.
You might want to take use my example mod. You should at least read the README as it outlines a few concepts and has some helpful references.
If you release code you've written people can see it. Java is one of the easiest languages to decompile, but this applies universally. It takes max 5 min to decompile & deobfuscate someone's mod. I don't see any reason for keeping code private ever (except for trying to monetise on it), if your worried about security your code should always be public so people can look at it and tell you about vulnerabilities for example. IMO the answer is never to keep code private