Class ItemProcessing


  • public class ItemProcessing
    extends java.lang.Object
    This helper class makes processing / crafting / creating items easier
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int getSelectedQuantity()
      This returns the currently selected quantity
      static boolean isOpen()
      This checks if the item processing interface is open
      static boolean make​(int id, int quantity)
      This will make the chosen item
      static boolean make​(java.lang.String itemName, int quantity)
      This will make the chosen item
      static boolean make​(Filter<Item> filter, int quantity)
      This will make the first matching item
      static boolean make​(Item item, int quantity)
      This will make the chosen item
      static boolean makeAll​(int id)
      This will make all of the chosen item
      static boolean makeAll​(java.lang.String itemName)
      This will make all of the chosen item
      static boolean makeAll​(Filter<Item> filter)
      This will make all of the first matching item
      static boolean makeAll​(Item item)
      This will make all of the chosen item
      static boolean setSelectedQuantity​(int quantity)
      This will set the selected quantity on the interface
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • makeAll

        public static boolean makeAll​(java.lang.String itemName)

        This will make all of the chosen item

        Note: The name will be checked against the item in the widget, it may be different than the item it produces

        Parameters:
        itemName - Item name to make
        Returns:
        true if it successfully sets the quantity and selects the item, false otherwise
      • makeAll

        public static boolean makeAll​(int id)

        This will make all of the chosen item

        Note: The id will be checked against the item in the widget, it may be different than the item it produces

        Parameters:
        id - Item id to make
        Returns:
        true if it successfully sets the quantity and selects the item, false otherwise
      • makeAll

        public static boolean makeAll​(Item item)

        This will make all of the chosen item

        Note: The item will be checked against the item in the widget, it may be different than the item it produces

        Parameters:
        item - Item to make
        Returns:
        true if it successfully sets the quantity and selects the item, false otherwise
      • makeAll

        public static boolean makeAll​(Filter<Item> filter)

        This will make all of the first matching item

        Note: The filter will be checked against the item in the widget, it may be different than the item it produces

        Parameters:
        filter - Filter for a valid item
        Returns:
        true if it successfully sets the quantity and selects the item, false otherwise
      • make

        public static boolean make​(java.lang.String itemName,
                                   int quantity)

        This will make the chosen item

        Note: The name will be checked against the item in the widget, it may be different than the item it produces

        Parameters:
        itemName - Item name to make
        quantity - Quantity of the item to make
        Returns:
        true if it successfully sets the quantity and selects the item, false otherwise
      • make

        public static boolean make​(int id,
                                   int quantity)

        This will make the chosen item

        Note: The id will be checked against the item in the widget, it may be different than the item it produces

        Parameters:
        id - Item id to make
        quantity - Quantity of the item to make
        Returns:
        true if it successfully sets the quantity and selects the item, false otherwise
      • make

        public static boolean make​(Filter<Item> filter,
                                   int quantity)

        This will make the first matching item

        Note: The filter will be checked against the item in the widget, it may be different than the item it produces

        Parameters:
        filter - Filter for a valid item
        quantity - Quantity of the item to make
        Returns:
        true if it successfully sets the quantity and selects the item, false otherwise
      • make

        public static boolean make​(Item item,
                                   int quantity)

        This will make the chosen item

        Note: The filter will be checked against the item in the widget, it may be different than the item it produces

        Parameters:
        item - Item to make
        quantity - Quantity of the item to make
        Returns:
        true if it successfully sets the quantity and selects the item, false otherwise
      • getSelectedQuantity

        public static int getSelectedQuantity()
        This returns the currently selected quantity
        Returns:
        0 if the interface isn't open, -1 if all, or the selected quantity
      • setSelectedQuantity

        public static boolean setSelectedQuantity​(int quantity)
        This will set the selected quantity on the interface
        Parameters:
        quantity - The quantity you'd like to set as selected, use -1 for all
        Returns:
        true if successfully set, false otherwise
      • isOpen

        public static boolean isOpen()
        This checks if the item processing interface is open
        Returns:
        true if it's open, false otherwise