Expand recipematch constructors

This commit is contained in:
Bernhard Bonigl committed 2016-01-08 16:39:53 +01:00
1 parent 0fe940c90a
commit dbca52d9eb
1 file changed
+21
@@ -54,6 +54,18 @@ public abstract class RecipeMatch {
return new RecipeMatch.Oredict(oredict, amount, matched);
}
public static RecipeMatch of(List<ItemStack> oredict) {
return of(oredict, 1);
}
public static RecipeMatch of(List<ItemStack> oredict, int matched) {
return of(oredict, 1, matched);
}
public static RecipeMatch of(List<ItemStack> oredict, int amount, int matched) {
return new RecipeMatch.Oredict(oredict, amount, matched);
}
public static RecipeMatch of(net.minecraft.item.Item item) {
return of(item, 1);
}
@@ -216,6 +228,15 @@ public abstract class RecipeMatch {
private final List<ItemStack> oredictEntry; // todo: change this to the actual list in the oredict
public Oredict(List<ItemStack> oredictEntry, int amountNeeded) {
this(oredictEntry, amountNeeded, 1);
}
public Oredict(List<ItemStack> oredictEntry, int amountNeeded, int amountMatched) {
super(amountMatched, amountNeeded);
this.oredictEntry = oredictEntry;
}
public Oredict(String oredictEntry, int amountNeeded) {
this(oredictEntry, amountNeeded, 1);
}