diff --git a/Common/src/main/java/com/almostreliable/unified/recipe/RecipeTransformer.java b/Common/src/main/java/com/almostreliable/unified/recipe/RecipeTransformer.java index 030d190..f0165fb 100644 --- a/Common/src/main/java/com/almostreliable/unified/recipe/RecipeTransformer.java +++ b/Common/src/main/java/com/almostreliable/unified/recipe/RecipeTransformer.java @@ -15,7 +15,6 @@ import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import net.minecraft.resources.ResourceLocation; -import javax.annotation.Nullable; import java.util.*; import java.util.function.BiConsumer; import java.util.function.Consumer; @@ -65,9 +64,9 @@ public class RecipeTransformer { } else { transformRecipes(recipeLinks, recipes::put, recipes::remove); } + result.addAll(recipeLinks); }); - byType.values().stream().flatMap(Collection::stream).forEach(result::add); AlmostUnified.LOG.warn("Recipe counts afterwards: " + recipes.size()); return result; } @@ -200,6 +199,10 @@ public class RecipeTransformer { } } + private void addAll(Collection links) { + links.forEach(this::add); + } + public Collection getRecipes(ResourceLocation type) { return Collections.unmodifiableCollection(allRecipesByType.get(type)); }