Open AlexCouch opened 6 years ago
Great idea! I hope this gets accepted
Well, cray has already made his own version while I was making this. But I'm currently finalizing a plugin system for adding support for different uses of an annotation @CDMRegister
for different elements of the mod/addons. Right now, applications and tasks are supported.
Ok
I went ahead and created that annotation you were talking about. It was pretty simple tbh. I didn't have to changed anything in the original code, just had to provide a way for the app class to be pushed from the annotation backend to the actual registration system:
ApplicationManager#registerApplication
. Created a simple wrapper interface that gets implemented when the class gets hooked through the annotation. The annotation's information gets passed into said interface,IAppContainer
, as well as the class instance of the app class gets stored in the interface instance as well to be passed into the original registration system.