Class BrewingRecipeRegistry
- java.lang.Object
-
- net.minecraftforge.common.brewing.BrewingRecipeRegistry
-
public class BrewingRecipeRegistry extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.List<IBrewingRecipe>
recipes
-
Constructor Summary
Constructors Constructor Description BrewingRecipeRegistry()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
addRecipe(Ingredient input, Ingredient ingredient, ItemStack output)
Adds a recipe to the registry.static boolean
addRecipe(IBrewingRecipe recipe)
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 hasslestatic 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 registrystatic boolean
hasOutput(ItemStack input, ItemStack ingredient)
Returns true if the passed input and ingredient have an outputstatic 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.
-
-
-
Field Detail
-
recipes
private static java.util.List<IBrewingRecipe> recipes
-
-
Method Detail
-
addRecipe
public static boolean addRecipe(Ingredient input, Ingredient ingredient, ItemStack output)
Adds a recipe to the registry. Due to the nature of the brewing stand inputs that stack (a.k.a max stack size > 1) are not allowed.- Parameters:
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.- Returns:
- true if the recipe was added.
-
addRecipe
public static boolean addRecipe(IBrewingRecipe recipe)
Adds a recipe to the registry. Due to the nature of the brewing stand inputs that stack (a.k.a max stack size > 1) are not allowed.
-
getOutput
public static ItemStack getOutput(ItemStack input, ItemStack ingredient)
Returns the output ItemStack obtained by brewing the passed input and ingredient.
-
hasOutput
public static boolean hasOutput(ItemStack input, ItemStack ingredient)
Returns true if the passed input and ingredient have an output
-
canBrew
public static boolean canBrew(NonNullList<ItemStack> inputs, ItemStack ingredient, int[] inputIndexes)
Used by the brewing stand to determine if its contents can be brewed. Extra parameters exist to allow modders to create bigger brewing stands without much hassle
-
brewPotions
public 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
-
isValidIngredient
public static boolean isValidIngredient(ItemStack stack)
Returns true if the passed ItemStack is a valid ingredient for any of the recipes in the registry.
-
isValidInput
public static boolean isValidInput(ItemStack stack)
Returns true if the passed ItemStack is a valid input for any of the recipes in the registry.
-
getRecipes
public static java.util.List<IBrewingRecipe> getRecipes()
Returns an unmodifiable list containing all the recipes in the registry
-
-