Interface Potion

  • All Superinterfaces:
    java.lang.Cloneable, java.lang.Comparable<java.lang.Object>, Described, Identifiable, Named, Unique
    All Known Implementing Classes:
    MagellanPotionImpl

    public interface Potion
    extends Described
    Container class for a potion based on its representation in a cr version >= 42.
    • Method Detail

      • setLevel

        void setLevel​(int level)
        Sets the level of this Potion.
      • getLevel

        int getLevel()
        Returns the level of this Potion.
      • ingredients

        java.util.Collection<Item> ingredients()
        Returns the ingredients required for this potion. The elements are instances of class Item.
      • getIngredient

        Item getIngredient​(ID key)
        Returns a specific ingredient of this potion.
        Parameters:
        key - the item type id of the ingredient to be returned.
      • addIngredient

        Item addIngredient​(Item i)
        Puts a new element into the list of ingredients required to brew this potion.
      • removeIngredient

        Item removeIngredient​(ID key)
        Removes an item from the list of ingredients required to brew this potion.
        Parameters:
        key - the id of the item's item type to be removed.
      • clearIngredients

        void clearIngredients()
        Removes all ingredients of this potion.