Merge pull request #518 from narc0tiq/refinery-recipe-query2
API change: query for refinery recipes, now with Collections.unmodifiableSortedSet
This commit is contained in:
commit
378f3d9fd8
1 changed files with 5 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
package buildcraft.api.recipes;
|
package buildcraft.api.recipes;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
import java.util.TreeSet;
|
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) {
|
public static RefineryRecipe findRefineryRecipe(LiquidStack liquid1, LiquidStack liquid2) {
|
||||||
for (RefineryRecipe recipe : recipes)
|
for (RefineryRecipe recipe : recipes)
|
||||||
if (recipe.matches(liquid1, liquid2))
|
if (recipe.matches(liquid1, liquid2))
|
||||||
|
|
Loading…
Reference in a new issue