-
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
[Request] @ExpectPlatform fields #11
Comments
This can already be done by making the code in your field initialiser into an |
But then I’d have to make a separate method for each field… |
How would expect platform fields even work? |
Autogenerated Methods with reflection? |
in <clinit> to access the impl's field's value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Say I have an abstract class in common module that extends from Block class. But I need to have some different code in fabric vs forge. I would implement that abstract class in both forge and fabric modules. This is fine, but now I have 2 RegistrySuppliers and neither are accessible from common module. What I have been doing to work around this is making a public static but not final RegistrySupplier field in common module, but not assigning a value to it and in forge and fabric modules under a static {} block setting the common field to a registered value.
this works, but it would be much more neat and convenient if I could use something like expectplatform to make sure the field has the correct value. This would also make final fields possible in this situation
The text was updated successfully, but these errors were encountered: