-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotation for loading class if mod is present #201
Comments
required would ideally be a list of modids where all modids present would then run the class |
ideally this could be added to |
I could see an use case where the list could be treated as an OR too (i.e. run this code if any recipe viewer is present or if any jade-like mod is present or if any mod with which I have optional recipes is present). This might be complicating it but a list of |
If we do it, we should go full hog with conditionals, in my opinion. |
Why not just load the class via reflection in the mod, instead of adding more magic just to save a few LOC? |
The same argument could be applied to dist-conditions |
Its common practice for mods to add apis or features other devs can use to add integration. For optional integration its common place for a dev to put the compat in a different class and then call that class with an if check for if the mod is loaded. This is fine, but I think itd be super helpful to have something to conditionally load a class with an annotation. like
So that the class will only ever load if the mod "argonauts" is present.
The text was updated successfully, but these errors were encountered: