Recipematch utility constructors for item/block+meta

This commit is contained in:
Bernhard Bonigl committed 2016-04-17 12:04:42 +02:00
1 parent 70e35d8daf
commit c9d86495c3
1 file changed
+12
@@ -89,6 +89,18 @@ public abstract class RecipeMatch {
return new RecipeMatch.Item(new ItemStack(block), amount, matched);
}
public static RecipeMatch of(ItemStack stack) {
return of(stack, 1);
}
public static RecipeMatch of(ItemStack stack, int matched) {
return of(stack, 1, matched);
}
public static RecipeMatch of(ItemStack stack, int amount, int matched) {
return new RecipeMatch.Item(stack.copy(), amount, matched);
}
public static RecipeMatch ofNBT(ItemStack stack) {
return ofNBT(stack, 1);
}