-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Force recipes to provide (sub)category #51744
Force recipes to provide (sub)category #51744
Conversation
It found one, but the error isn't super informative:
EDIT: Actually nevermind, the error matcher gets the file and line number from... somewhere? |
Fixed that error, but because Magicylsm is tested separately from the other mods there might be more to come. |
As suggested in CleverRaven#50866, require all recipe definitions to provide a category and subcategory when loading from JSON.
591a82d
to
04bdea5
Compare
found one and fixed, here is pr #51840
|
Turns out that the part of the CI that was checking mod JSON data has been broken for a while, which is why we didn't see errors outside of Magiclysm in this PR. I'm attempting to fix that in #51843. |
Summary
None
Purpose of change
As suggested in #50866, recipes without a subcategory are problematic because users might never find them.
Describe the solution
Require all recipe definitions to provide a category and subcategory when loading from JSON.
To make
mandatory
work properly, this entailed adding awas_loaded
member torecipe
. Recipes aren't loaded via generic_factory, but hopefully this is a good enough approximation to work for our purposes.Describe alternatives you've considered
Adding a check at verification time.
Testing
Unit tests.
I didn't thoroughly check mods; will let the CI do that.
Additional context