-
Notifications
You must be signed in to change notification settings - Fork 181
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
Recipe conflict detection #525
Conversation
this will conflict with #504 where i removed the |
6f88569
to
2fa9533
Compare
Due to the difficulty of bootstrapping the test environment to a point where all our recipes have been registered, the ci test will unfortunately not be happening in this PR. Someone else can feel free to try to implement it. |
more stolen code from /gt hand
This is basically done, but the recipe matching code will most likely will need to be redone for #329 and #530. Current list of recipe conflicts detected, for reference (in the order they are printed in the log):
All recipe configs are on their default values, there may be more on other config combinations |
In #530 all recipes are stored as a Collection, so if at any leaf size() > 1 you get a conflict (it simply means the same input can react multiple recipes) You can supply a predicate simply being a -> true and it won't check ingredient counts. |
What:
Adds a command to check all Recipes in all RecipeMaps to see if anything seems to conflict with them.
How solved:
Iterate over all recipes in each map, and for each one:
RecipeMap.findRecipe
on the input listAfterwards, pretty-print all detected conflicts to the log.
Outcome:
Less recipe conflicts
Additional info:
Example conflict messages:
(There unfortunately does not seem to be a good way to get the oredict name from the
CountableIngredient
)Possible compatibility issue:
Will not detect conflicts only present when extra items are required to present the conflict, or conflicts that just happen to produce the correct recipe and do not occur when running the conflicting recipe due to extra inputs