Class PotionMix

java.lang.Object
io.papermc.paper.potion.PotionMix
All Implemented Interfaces:
Keyed, Keyed

@NullMarked @Deprecated(since="26.3", forRemoval=true) public final class PotionMix extends Object implements Keyed
Deprecated, for removal: This API element is subject to removal in a future version.
Fully replaced by BrewingRecipe.
Represents a potion mix made in a Brewing Stand.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PotionMix(NamespacedKey key, ItemStack result, RecipeChoice input, RecipeChoice ingredient)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new potion mix.
  • Method Summary

    Modifier and Type
    Method
    Description
    createPredicateChoice(Predicate<? super ItemStack> stackPredicate)
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the ingredient in the top slot of the brewing stand.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the input for the bottom 3 slots in the brewing stand.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the namespaced identifier for this object.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the resulting itemstack after the brew has finished.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface Keyed

    key
  • Constructor Details

    • PotionMix

      public PotionMix(NamespacedKey key, ItemStack result, RecipeChoice input, RecipeChoice ingredient)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new potion mix. Add it to the server with PotionBrewer.addPotionMix(PotionMix).
      Parameters:
      key - a unique key for the mix
      result - the resulting itemstack that will appear in the 3 bottom slots
      input - the input placed into the bottom 3 slots
      ingredient - the ingredient placed into the top slot
  • Method Details

    • createPredicateChoice

      @Contract(value="_ -> new", pure=true) @Deprecated(since="26.2") public static RecipeChoice createPredicateChoice(Predicate<? super ItemStack> stackPredicate)
      Create a RecipeChoice based on a Predicate. These RecipeChoices are only valid for PotionMix, not anywhere else RecipeChoices may be used.
      Parameters:
      stackPredicate - a predicate for an itemstack.
      Returns:
      a new RecipeChoice
    • getKey

      public NamespacedKey getKey()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Keyed
      Return the namespaced identifier for this object.
      Specified by:
      getKey in interface Keyed
      Returns:
      this object's key
    • getResult

      public ItemStack getResult()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the resulting itemstack after the brew has finished.
      Returns:
      the result itemstack
    • getInput

      public RecipeChoice getInput()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the input for the bottom 3 slots in the brewing stand.
      Returns:
      the bottom 3 slot ingredients
    • getIngredient

      public RecipeChoice getIngredient()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the ingredient in the top slot of the brewing stand.
      Returns:
      the top slot input
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      hashCode in class Object