Package io.papermc.paper.potion
Class PotionMix
java.lang.Object
io.papermc.paper.potion.PotionMix
Represents a potion mix made in a Brewing Stand.
-
Constructor Summary
ConstructorDescriptionPotionMix
(NamespacedKey key, ItemStack result, RecipeChoice input, RecipeChoice ingredient) Creates a new potion mix. -
Method Summary
Modifier and TypeMethodDescriptionstatic RecipeChoice
createPredicateChoice
(Predicate<? super ItemStack> stackPredicate) Create aRecipeChoice
based on a Predicate.boolean
Gets the ingredient in the top slot of the brewing stand.getInput()
Gets the input for the bottom 3 slots in the brewing stand.getKey()
Return the namespaced identifier for this object.Gets the resulting itemstack after the brew has finished.int
hashCode()
toString()
-
Constructor Details
-
PotionMix
Creates a new potion mix. Add it to the server withPotionBrewer.addPotionMix(PotionMix)
.- Parameters:
key
- a unique key for the mixresult
- the resulting itemstack that will appear in the 3 bottom slotsinput
- the input placed into the bottom 3 slotsingredient
- the ingredient placed into the top slot
-
-
Method Details
-
createPredicateChoice
@Contract(value="_ -> new", pure=true) public static RecipeChoice createPredicateChoice(Predicate<? super ItemStack> stackPredicate) Create aRecipeChoice
based on a Predicate. These RecipeChoices are only valid forPotionMix
, not anywhere else RecipeChoices may be used.- Parameters:
stackPredicate
- a predicate for an itemstack.- Returns:
- a new RecipeChoice
-
getKey
Description copied from interface:Keyed
Return the namespaced identifier for this object. -
getResult
Gets the resulting itemstack after the brew has finished.- Returns:
- the result itemstack
-
getInput
Gets the input for the bottom 3 slots in the brewing stand.- Returns:
- the bottom 3 slot ingredients
-
getIngredient
Gets the ingredient in the top slot of the brewing stand.- Returns:
- the top slot input
-
toString
-
equals
-
hashCode
public int hashCode()
-