Since some recipe types/ingredients can throw CMEs, it is not safe to simply use a parallel stream on any recipe and call matches. This PR solves that issue by only applying parallelization to recipe types that are known to be safe. Currently, this is limited to vanilla recipe classes and ingredients, however even with such a strict check 96% of recipes are still parallelized in the ForgeCraft 1.20 pack.
Marked this as a draft since the code was written quickly and is intended to be a proof-of-concept.
Since some recipe types/ingredients can throw CMEs, it is not safe to simply use a parallel stream on any recipe and call
matches
. This PR solves that issue by only applying parallelization to recipe types that are known to be safe. Currently, this is limited to vanilla recipe classes and ingredients, however even with such a strict check 96% of recipes are still parallelized in the ForgeCraft 1.20 pack.Marked this as a draft since the code was written quickly and is intended to be a proof-of-concept.