-
Notifications
You must be signed in to change notification settings - Fork 12
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
ExpectPlatform classes #5
Comments
How would this work for libraries that are not compiled using architectury? Would they have to use the platform implementations from |
Expect platform fields would be useful too |
An annotation for excluding or including a method in common from being an expect platform method in the class? |
Even better, the implementation classes could be subclasses of the common class and the overridden methods in the implementation classes could just be the implementation methods so all you would have to do is replace the object creation statements with the appropriate implementation class. The inheritance stuff would take care of the methods. You would also need to enforce somehow that the common class is used in common module and the implementation class is used in implementation module (the common still gets replaced with the implementation in common module) |
@Witherking25 as long as common gets replaced in implementation module, everything would work with that as common can't see the impl... tho, I just use ServiceLoader at this point... |
If you use common class in a fabric only mod it won’t work same thing for forge only mod |
Would this work? Lines 84 to 99 in 6916af5
|
Accept classes in @ExpectPlatform, may be confusing.
Library Common:
Library Fabric:
Library Forge:
Using the library in Common:
Using the library in Fabric / Forge:
The text was updated successfully, but these errors were encountered: