Add way to query for refinery recipes

This commit is contained in:
Octav Sandulescu 2012-12-19 15:02:00 +02:00
parent d8750a5d08
commit d6a0457368

View file

@ -9,6 +9,7 @@
package buildcraft.api.recipes;
import java.util.Collections;
import java.util.SortedSet;
import java.util.TreeSet;
@ -24,6 +25,10 @@ public class RefineryRecipe implements Comparable<RefineryRecipe> {
}
}
public static SortedSet<RefineryRecipe> getRecipes() {
return Collections.unmodifiableSortedSet(recipes);
}
public static RefineryRecipe findRefineryRecipe(LiquidStack liquid1, LiquidStack liquid2) {
for (RefineryRecipe recipe : recipes)
if (recipe.matches(liquid1, liquid2))