-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[1.20.6] Prevent the @OnlyIn
being misused on @EventBusSubscriber
and @Mod
annotated classes
#9891
[1.20.6] Prevent the @OnlyIn
being misused on @EventBusSubscriber
and @Mod
annotated classes
#9891
Conversation
…sSubscriber and Mod annotated classes
Is there a real need for this? Have you seen many mods do this? |
javafmllanguage/src/main/java/net/minecraftforge/fml/javafmlmod/AutomaticEventSubscriber.java
Outdated
Show resolved
Hide resolved
javafmllanguage/src/main/java/net/minecraftforge/fml/javafmlmod/AutomaticEventSubscriber.java
Outdated
Show resolved
Hide resolved
fmlloader/src/main/java/net/minecraftforge/fml/loading/RuntimeDistCleaner.java
Outdated
Show resolved
Hide resolved
fmlloader/src/main/java/net/minecraftforge/fml/loading/RuntimeDistCleaner.java
Show resolved
Hide resolved
I added it to the wishlist because I noticed some devs do this thinking it fixes crashing servers, when in reality it just gives a different error at best. It's not common, but the less mods using OnlyIn incorrectly, the better for everyone.
Thanks, I'll merge once my requested changes are implemented. As for the verbosity, half of it seems to be a cleanup of the RuntimeDistCleaner to use less streams |
…d/AutomaticEventSubscriber.java Co-authored-by: Paint_Ninja <PaintNinja@users.noreply.github.com>
@OnlyIn
being misused on @EventBusSubscriber
and @Mod
annotated classes
Adds checks to prevent the OnlyIn annotation being used in erroneous places such as classes annotated with the
@Mod
, or@EventBusSubscriber
as outlined here