public class BrewingRecipeRegistry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.List<IBrewingRecipe> |
recipes |
Constructor and Description |
---|
BrewingRecipeRegistry() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addRecipe(IBrewingRecipe recipe)
Adds a recipe to the registry.
|
static boolean |
addRecipe(Ingredient input,
Ingredient ingredient,
ItemStack output)
Adds a recipe to the registry.
|
static void |
brewPotions(NonNullList<ItemStack> inputs,
ItemStack ingredient,
int[] inputIndexes)
Used by the brewing stand to brew its inventory Extra parameters exist to
allow modders to create bigger brewing stands without much hassle
|
static boolean |
canBrew(NonNullList<ItemStack> inputs,
ItemStack ingredient,
int[] inputIndexes)
Used by the brewing stand to determine if its contents can be brewed.
|
static ItemStack |
getOutput(ItemStack input,
ItemStack ingredient)
Returns the output ItemStack obtained by brewing the passed input and
ingredient.
|
static java.util.List<IBrewingRecipe> |
getRecipes()
Returns an unmodifiable list containing all the recipes in the registry
|
static boolean |
hasOutput(ItemStack input,
ItemStack ingredient)
Returns true if the passed input and ingredient have an output
|
static boolean |
isValidIngredient(ItemStack stack)
Returns true if the passed ItemStack is a valid ingredient for any of the
recipes in the registry.
|
static boolean |
isValidInput(ItemStack stack)
Returns true if the passed ItemStack is a valid input for any of the
recipes in the registry.
|
private static java.util.List<IBrewingRecipe> recipes
public static boolean addRecipe(Ingredient input, Ingredient ingredient, ItemStack output)
input
- The Ingredient that goes in same slots as the water bottles
would.ingredient
- The Ingredient that goes in the same slot as nether wart would.output
- The ItemStack that will replace the input once the brewing is
done.public static boolean addRecipe(IBrewingRecipe recipe)
public static ItemStack getOutput(ItemStack input, ItemStack ingredient)
public static boolean hasOutput(ItemStack input, ItemStack ingredient)
public static boolean canBrew(NonNullList<ItemStack> inputs, ItemStack ingredient, int[] inputIndexes)
public static void brewPotions(NonNullList<ItemStack> inputs, ItemStack ingredient, int[] inputIndexes)
public static boolean isValidIngredient(ItemStack stack)
public static boolean isValidInput(ItemStack stack)
public static java.util.List<IBrewingRecipe> getRecipes()