fix: *correctly* handly empty ingredients
This commit is contained in:
parent
bd494d7707
commit
ae42a1a04c
|
@ -84,7 +84,7 @@ public class ShapedRecipeBuilder {
|
|||
DefaultedList<Ingredient> ingredients = DefaultedList.of();
|
||||
Arrays.stream(this.pattern)
|
||||
.flatMap(s -> s.chars().mapToObj(c -> (char) c))
|
||||
.map(this.ingredients::get)
|
||||
.map(k -> this.ingredients.getOrDefault(k, Ingredient.empty()))
|
||||
.forEach(ingredients::add);
|
||||
|
||||
return new ShapedRecipe(
|
||||
|
|
Loading…
Reference in a new issue