Posted April 1, 20187 yr Howdy, Is this alright or is there a better way? @SubscribeEvent(priority = EventPriority.LOWEST) public void onSomeEventWithResultLate(SomeEventWithResult event) { if (ModConfig.COMPATIBILITY.runLatest) { // do stuff as late as possible so hopefully our result is the one that counts } } @SubscribeEvent(priority = EventPriority.HIGHEST) public void onSomeEventWithResultEarly(SomeEventWithResult event) { if (!ModConfig.COMPATIBILITY.runLatest) { // do stuff as soon as possible to let other mod events override it if they want } } Obviously the idea is to let the user decide whether they want this aspect of a mod to be more important to less important than other mods. I may also have logic in the LOWEST priority to react differently depending on an existing result, if any, but that's neither here nor there. Edited April 1, 20187 yr by CosmicDan Method names CosmicDan.com Windows software, Android hacking, and other curios
April 3, 20187 yr Yeah, I think that should work except that if other mods set their priority to highest then you you're not guaranteed to have yours go before theirs (I assume the order is based on mod loading or modID alphabetical) and if other mods set their priority to lowest then you're not guaranteed to have yours go after thiers. In fact, one or the other will not fully work because if you're first in order for the highest then you'll be first in order for the lowest, and vice versa. But at least you can say you tried. And it should work for mods where they leave the priority at default (normal). Edited April 3, 20187 yr by jabelar Check out my tutorials here: http://jabelarminecraft.blogspot.com/
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.