You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the @Mod.EventBusSubscriber it subscribes the class to the bus on both sides. You can however specify the side it is subscribed on using the value property of the annotation(example). Without specifying it the class will be subscribed on both sides which may lead to issues. While ClientEventSubscriber in your case doesn't load any client-only classes when loaded it gives modmakers a false impression that it will only be loaded on the client(because of the name). They may then decide to expose client-only classes in it(by making their methods return/take them as parameters, or by specifying fields of those types) and thus crashing the server. I recommend you specify the side in your EventBusSubscriber annotation to avoid those issues.
Edit: The same appies to the ServerEventSubscriber class actually.
The text was updated successfully, but these errors were encountered:
When using the @Mod.EventBusSubscriber it subscribes the class to the bus on both sides. You can however specify the side it is subscribed on using the value property of the annotation(example). Without specifying it the class will be subscribed on both sides which may lead to issues. While ClientEventSubscriber in your case doesn't load any client-only classes when loaded it gives modmakers a false impression that it will only be loaded on the client(because of the name). They may then decide to expose client-only classes in it(by making their methods return/take them as parameters, or by specifying fields of those types) and thus crashing the server. I recommend you specify the side in your EventBusSubscriber annotation to avoid those issues.
Edit: The same appies to the ServerEventSubscriber class actually.
The text was updated successfully, but these errors were encountered: