Class BrewingRecipeRegistry
java.lang.Object
net.minecraftforge.common.brewing.BrewingRecipeRegistry
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaddRecipe(Ingredient input, Ingredient ingredient, ItemStack output) Adds a recipe to the registry.static booleanaddRecipe(IBrewingRecipe recipe) Adds a recipe to the registry.static voidbrewPotions(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 booleancanBrew(NonNullList<ItemStack> inputs, ItemStack ingredient, int[] inputIndexes) Used by the brewing stand to determine if its contents can be brewed.static ItemStackReturns the output ItemStack obtained by brewing the passed input and ingredient.static List<IBrewingRecipe>Returns an unmodifiable list containing all the recipes in the registrystatic booleanReturns true if the passed input and ingredient have an outputstatic booleanisValidIngredient(ItemStack stack) Returns true if the passed ItemStack is a valid ingredient for any of the recipes in the registry.static booleanisValidInput(ItemStack stack) Returns true if the passed ItemStack is a valid input for any of the recipes in the registry.
-
Field Details
-
recipes
-
-
Constructor Details
-
BrewingRecipeRegistry
public BrewingRecipeRegistry()
-
-
Method Details
-
addRecipe
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
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
Returns the output ItemStack obtained by brewing the passed input and ingredient. -
hasOutput
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
Returns true if the passed ItemStack is a valid ingredient for any of the recipes in the registry. -
isValidInput
Returns true if the passed ItemStack is a valid input for any of the recipes in the registry. -
getRecipes
Returns an unmodifiable list containing all the recipes in the registry
-