Interface IBrewingRecipe

All Known Implementing Classes:
BrewingRecipe

public interface IBrewingRecipe
Represents a flexible brewing recipe for the Minecraft brewing stand.

Implementations of this interface define custom brewing logic beyond vanilla recipes. Recipes should be registered via RegisterBrewingRecipesEvent.

  • Method Summary

    Modifier and Type
    Method
    Description
    default @NotNull net.minecraft.world.item.ItemStack
    getOutput(net.minecraft.world.item.ItemStack input, net.minecraft.world.item.ItemStack ingredient)
    Computes the resulting output when brewing the given input with the given ingredient.
    @NotNull net.minecraft.world.item.crafting.Ingredient
    Gets the ingredient requirement for this recipe.
    @NotNull net.minecraft.world.item.crafting.Ingredient
    Gets the input requirement for this recipe.
    boolean
    isIngredient(net.minecraft.world.item.ItemStack ingredient)
    Checks whether the given ItemStack is a valid ingredient for this recipe.
    boolean
    isInput(net.minecraft.world.item.ItemStack input)
    Checks whether the given ItemStack is a valid input for this recipe.
    @NotNull net.minecraft.world.item.ItemStack
    Gets the result of brewing the valid input with the valid ingredient.
  • Method Details

    • isInput

      boolean isInput(net.minecraft.world.item.ItemStack input)
      Checks whether the given ItemStack is a valid input for this recipe.

      "Input" refers to the item placed in one of the three bottom slots of the brewing stand (e.g., a water bottle).

      Parameters:
      input - the ItemStack to test
      Returns:
      true if the item is a valid input, otherwise false
    • isIngredient

      boolean isIngredient(net.minecraft.world.item.ItemStack ingredient)
      Checks whether the given ItemStack is a valid ingredient for this recipe.

      "Ingredient" refers to the item placed in the top slot of the brewing stand (e.g., nether wart).

      Parameters:
      ingredient - the ItemStack to test
      Returns:
      true if the item is a valid ingredient, otherwise false
    • input

      @NotNull @NotNull net.minecraft.world.item.crafting.Ingredient input()
      Gets the input requirement for this recipe.
      Returns:
      the required input as an Ingredient
    • ingredient

      @NotNull @NotNull net.minecraft.world.item.crafting.Ingredient ingredient()
      Gets the ingredient requirement for this recipe.
      Returns:
      the required ingredient as an Ingredient
    • output

      @NotNull @NotNull net.minecraft.world.item.ItemStack output()
      Gets the result of brewing the valid input with the valid ingredient.
      Returns:
      the resulting ItemStack
    • getOutput

      @NotNull default @NotNull net.minecraft.world.item.ItemStack getOutput(net.minecraft.world.item.ItemStack input, net.minecraft.world.item.ItemStack ingredient)
      Computes the resulting output when brewing the given input with the given ingredient.

      If either the input or ingredient is invalid, returns ItemStack.EMPTY.

      Parameters:
      input - the brewing stand's bottom slot item
      ingredient - the brewing stand's top slot item
      Returns:
      the resulting ItemStack if valid, otherwise ItemStack.EMPTY