-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Add supplier to EnumClassInfo #7097
base: dev/feature
Are you sure you want to change the base?
Add supplier to EnumClassInfo #7097
Conversation
- removes it from 'ClassInfo#getSupplier' - Also renames some things under EnumClassInfo to better reflect
I'm not against this change but what exactly is the benefit here? Shouldn't users never interact with supplier directly, and only through getSupplier? |
There is likely no benefit outside of at least understanding where things are taking place, a user shouldn't need to feel a need to add getSupplier should only return a supplier not set a supplier if it's not already set |
well it's rather beneficial to not have a supplier until it's actually needed, but that's pretty minor |
Whoops didn't see this earlier Co-authored-by: Efy <[email protected]>
- currently unused but is good for future implementations
Description
This PR aims to update the EnumClassInfo with a provided supplier method, this way it's no dependant on the creation of one within the
ClassInfo#getSupplier
method.In addition to this change EnumClassInfo parameters were changed to more understandable ones, rather than stopping there I added StringMode support into
EnumUtils#toString
this change was done mostly for ease of use of developers that may or may not change based off flags, since flags already represented the StringMode I wanted to increase usability in these. Since existing implementations lack the support for it.Target Minecraft Versions: any
Requirements: none
Related Issues: none