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 TypeMethodDescriptiondefault @NotNull net.minecraft.world.item.ItemStackgetOutput(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.IngredientGets the ingredient requirement for this recipe.@NotNull net.minecraft.world.item.crafting.Ingredientinput()Gets the input requirement for this recipe.booleanisIngredient(net.minecraft.world.item.ItemStack ingredient) Checks whether the givenItemStackis a valid ingredient for this recipe.booleanisInput(net.minecraft.world.item.ItemStack input) Checks whether the givenItemStackis a valid input for this recipe.@NotNull net.minecraft.world.item.ItemStackoutput()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 givenItemStackis 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- theItemStackto test- Returns:
trueif the item is a valid input, otherwisefalse
-
isIngredient
boolean isIngredient(net.minecraft.world.item.ItemStack ingredient) Checks whether the givenItemStackis 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- theItemStackto test- Returns:
trueif the item is a valid ingredient, otherwisefalse
-
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 itemingredient- the brewing stand's top slot item- Returns:
- the resulting
ItemStackif valid, otherwiseItemStack.EMPTY
-