Treat DeclarativeRecipe specially when loading recipe from descriptor

This commit is contained in:
aboyko
2022-10-14 13:13:55 -04:00
parent 2db435f47e
commit b91aec9de4

View File

@@ -53,7 +53,7 @@ public class LoadUtils {
public static Recipe createRecipe(RecipeDescriptor d, Function<String, Class<? extends Recipe>> getRecipeClass) {
Class<? extends Recipe> recipeClazz = getRecipeClass.apply(d.getName());
if (recipeClazz == null) {
if (recipeClazz == null || DeclarativeRecipe.class.getName().equals(recipeClazz.getName())) {
DeclarativeRecipe recipe = new DeclarativeRecipe(d.getName(), d.getDisplayName(), d.getDescription(),
d.getTags(), d.getEstimatedEffortPerOccurrence(), d.getSource(), false);
for (RecipeDescriptor subDescriptor : d.getRecipeList()) {