Class ItemProcessing
- java.lang.Object
-
- org.dreambot.api.methods.widget.helpers.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 quantitystatic boolean
isOpen()
This checks if the item processing interface is openstatic boolean
make(int id, int quantity)
This will make the chosen itemstatic boolean
make(java.lang.String itemName, int quantity)
This will make the chosen itemstatic boolean
make(Filter<Item> filter, int quantity)
This will make the first matching itemstatic boolean
make(Item item, int quantity)
This will make the chosen itemstatic boolean
makeAll(int id)
This will make all of the chosen itemstatic boolean
makeAll(java.lang.String itemName)
This will make all of the chosen itemstatic boolean
makeAll(Filter<Item> filter)
This will make all of the first matching itemstatic boolean
makeAll(Item item)
This will make all of the chosen itemstatic boolean
setSelectedQuantity(int quantity)
This will set the selected quantity on the interface
-
-
-
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 makequantity
- 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 makequantity
- 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 itemquantity
- 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 makequantity
- 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
-
-