Class BrewingRecipeRegistry

java.lang.Object
net.minecraftforge.common.brewing.BrewingRecipeRegistry

public class BrewingRecipeRegistry extends Object
  • Field Details

  • Constructor Details

    • BrewingRecipeRegistry

      public BrewingRecipeRegistry()
  • Method Details

    • 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 List<IBrewingRecipe> getRecipes()
      Returns an unmodifiable list containing all the recipes in the registry