Use CraftTweaker's @ModOnly to target ≥ 2 mods
roidrole opened this issue · 2 comments
Describe the feature you'd like
Currently, CraftTweaker's @ModOnly annotation can only target a single mod. It is useful for cross-mod interactions (notably, expanding CoT) to be able to target multiple mods
Describe alternatives you've considered
Currently, we can register it manually via CraftTweakerAPI.registerClass, but it is recommended to use @ZenRegister instead, and the latter is more compatible
Additional context
I had two possible implementations in mind : Either allow the @ModOnly annotation to be used multiple times (such as with @ Repeatable) or allow inputting an array of string in a single annotation
Minecraft version
1.12
Modloader
Forge
If you don't care zenutils dep. https://github.com/friendlyhj/ZenUtils/blob/master/src/main/java/youyihj/zenutils/api/zenscript/SidedZenRegister.java
Closed by 67c0b65.
I added a new annotation so there is no binary breaking change.