Add PredicateChoice recipe choice for crafting #10553
Replies: 4 comments
-
If no problem, I can make a pull-request with a dedicated patch for that. |
Beta Was this translation helpful? Give feedback.
-
Have you tried using Events rather than built in recipe types for implementing what you're trying to do. That's how complex custom recipes are typically implemented. |
Beta Was this translation helpful? Give feedback.
-
Yes, sure. I have tried to use another events to implement that, which takes more complicated and complex rather than just making a dedicated In my patch (already mentioned above), I introduced a |
Beta Was this translation helpful? Give feedback.
-
I plan to add this in the future after #7822 has been merged, but I want to do it in a way that still works with recipe book clicks which is much more involved than just adding another choice. If that turns out not to be possible, just adding the PredicateChoice and saying it won't work with recipe book clicks will be fine. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem?
Yup. I'm having some issues with custom recipes in my plugin, but it seems that
ExactChoice
doesn't work as a standard implementation for my specific condition to check ingredients, so I tried creating anotherRecipeChoice
but it didn't work sinceIngredient#test
didn't searches forRecipeChoice#test
.Describe the solution you'd like.
I'd like for a match case for
RecipeChoice#test
in crafting menu, since it's already a predicate and it would be usable.Also, we could make
PredicateChoice
in API to let the developer choose what predicate should work for matching its ingredient.Describe alternatives you've considered.
I think there isn't another dedicated alternative for that, since the only way to match my custom recipe is based on
Ingredient#test
, and it should work if it could useRecipeChoice#test
Other
It's an image from the specific code where it would be included in.
Beta Was this translation helpful? Give feedback.
All reactions