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
Feature request: Introduce split source sets, a feature that mods can opt into to have client and common code in separate source sets. This provides a compile-time guarantee that client code will never be called from common code (which also needs to run on dedicated servers). It has been confirmed that Minecraft is developed with a similar setup.
Potential problems:
The common source set should not be allowed to call client-only code from other mods. One solution is to auto-split mod dependencies based on the @OnlyIn annotation (requires mod dependency scanning :/). Another solution is to allow mods to publish separate artifacts for their client-only and common code.
Split source sets need to be used in NeoForge before they are usable in userdev.
(To be confirmed) Eclipse support for source sets is quite bad, and might not support this.
The text was updated successfully, but these errors were encountered:
Allowing mods to publish separate client/shared artifacts should not be particularly difficult, all things considered; it's not hard to solve at all with the variant selection tools that gradle gives you.
Feature request: Introduce split source sets, a feature that mods can opt into to have client and common code in separate source sets. This provides a compile-time guarantee that client code will never be called from common code (which also needs to run on dedicated servers). It has been confirmed that Minecraft is developed with a similar setup.
Potential problems:
@OnlyIn
annotation (requires mod dependency scanning :/). Another solution is to allow mods to publish separate artifacts for their client-only and common code.The text was updated successfully, but these errors were encountered: