mirror of
https://github.com/AlmostReliable/almostunified.git
synced 2024-11-14 19:25:13 -05:00
Update RecipeTransformer.java
This commit is contained in:
parent
7fe1f6254f
commit
8d6f2e565a
1 changed files with 5 additions and 2 deletions
|
@ -15,7 +15,6 @@ import com.google.gson.JsonObject;
|
||||||
import com.google.gson.JsonPrimitive;
|
import com.google.gson.JsonPrimitive;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
@ -65,9 +64,9 @@ public class RecipeTransformer {
|
||||||
} else {
|
} else {
|
||||||
transformRecipes(recipeLinks, recipes::put, recipes::remove);
|
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());
|
AlmostUnified.LOG.warn("Recipe counts afterwards: " + recipes.size());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -200,6 +199,10 @@ public class RecipeTransformer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void addAll(Collection<RecipeLink> links) {
|
||||||
|
links.forEach(this::add);
|
||||||
|
}
|
||||||
|
|
||||||
public Collection<RecipeLink> getRecipes(ResourceLocation type) {
|
public Collection<RecipeLink> getRecipes(ResourceLocation type) {
|
||||||
return Collections.unmodifiableCollection(allRecipesByType.get(type));
|
return Collections.unmodifiableCollection(allRecipesByType.get(type));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue