Enum Food
- java.lang.Object
-
- java.lang.Enum<Food>
-
- org.dreambot.api.data.consumables.Food
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
eat()
Eats the given food usingInventory.interact(Filter, String)
usinggetFilter()
and either "Eat" or "Drink" as the action.static boolean
eat(boolean overEat)
static boolean
eat(int minHealth, boolean overEat)
Checks for the bestFood
and eats it based on the minHealth and overEat parameters.static Food
getBestOnHand(boolean overEat)
Condition
getCondition()
Filter<Item>
getFilter()
Item
getFromInventory()
int
getHeals()
java.lang.String[]
getNames()
java.lang.String
toString()
Returns the proper name without _'s and proper casing.static Food
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Food[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SHRIMP
public static final Food SHRIMP
-
COOKED_CHICKEN
public static final Food COOKED_CHICKEN
-
COOKED_MEAT
public static final Food COOKED_MEAT
-
SARDINE
public static final Food SARDINE
-
BREAD
public static final Food BREAD
-
HERRING
public static final Food HERRING
-
TROUT
public static final Food TROUT
-
PIKE
public static final Food PIKE
-
PEACH
public static final Food PEACH
-
SALMON
public static final Food SALMON
-
TUNA
public static final Food TUNA
-
REDBERRY_PIE
public static final Food REDBERRY_PIE
-
JUG_OF_WINE
public static final Food JUG_OF_WINE
-
STEW
public static final Food STEW
-
CAKE
public static final Food CAKE
-
MEAT_PIE
public static final Food MEAT_PIE
-
LOBSTER
public static final Food LOBSTER
-
BASS
public static final Food BASS
-
PLAIN_PIZZA
public static final Food PLAIN_PIZZA
-
SWORDFISH
public static final Food SWORDFISH
-
POTATO_WITH_BUTTER
public static final Food POTATO_WITH_BUTTER
-
CHILLI_POTATO
public static final Food CHILLI_POTATO
-
APPLE_PIE
public static final Food APPLE_PIE
-
CHOCOLATE_CAKE
public static final Food CHOCOLATE_CAKE
-
CHOCOLATE_BOMB
public static final Food CHOCOLATE_BOMB
-
POTATO_WITH_CHEESE
public static final Food POTATO_WITH_CHEESE
-
MEAT_PIZZA
public static final Food MEAT_PIZZA
-
MONKFISH
public static final Food MONKFISH
-
ANCHOVY_PIZZA
public static final Food ANCHOVY_PIZZA
-
COOKED_KARAMBWAN
public static final Food COOKED_KARAMBWAN
-
CURRY
public static final Food CURRY
-
SHARK
public static final Food SHARK
-
SEA_TURTLE
public static final Food SEA_TURTLE
-
PINEAPPLE_PIZZA
public static final Food PINEAPPLE_PIZZA
-
SUMMER_PIE
public static final Food SUMMER_PIE
-
WILD_PIE
public static final Food WILD_PIE
-
MANTA_RAY
public static final Food MANTA_RAY
-
TUNA_POTATO
public static final Food TUNA_POTATO
-
DARK_CRAB
public static final Food DARK_CRAB
-
ANGLERFISH
public static final Food ANGLERFISH
-
BLIGHTED_KARAMBWAN
public static final Food BLIGHTED_KARAMBWAN
-
BLIGHTED_MANTA_RAY
public static final Food BLIGHTED_MANTA_RAY
-
BLIGHTED_ANGLERFISH
public static final Food BLIGHTED_ANGLERFISH
-
CHOC_ICE
public static final Food CHOC_ICE
-
-
Method Detail
-
values
public static Food[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Food c : Food.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Food valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getFromInventory
public Item getFromInventory()
- Returns:
Item
that matchesgetFilter()
from your Inventory, else null if none found
-
eat
public boolean eat()
Eats the given food usingInventory.interact(Filter, String)
usinggetFilter()
and either "Eat" or "Drink" as the action. Returns false if thecondition
returns false.- Returns:
- see
Inventory.interact(Filter, String)
-
getBestOnHand
public static Food getBestOnHand(boolean overEat)
- Parameters:
overEat
- IfBoolean.TRUE
, it will ignoregetHeals()
, otherwise it will only return aFood
that heals for <= your missing hp- Returns:
- Best
Food
inInventory
that satisfies the overEat parameter. Null if none found.
-
getHeals
public int getHeals()
-
eat
public static boolean eat(boolean overEat)
-
eat
public static boolean eat(int minHealth, boolean overEat)
Checks for the bestFood
and eats it based on the minHealth and overEat parameters. It will check against your currentSkill.HITPOINTS
'sSkill.getBoostedLevel()
for the minHealth parameter. If your current hitpoints are >= the minHealth amount, it will not eat.- Parameters:
minHealth
- The minimum HP you require before eating.overEat
-Boolean
value for if you want the method to eat even if it will over-heal you.- Returns:
Boolean.FALSE
if your health is above the minimum value and overEat is false or if there is no validFood
found. Seeeat()
if a validFood
is found.
-
toString
public java.lang.String toString()
Returns the proper name without _'s and proper casing. EX: Manta ray instead of MANTA_RAY- Overrides:
toString
in classjava.lang.Enum<Food>
-
getNames
public java.lang.String[] getNames()
-
getCondition
public Condition getCondition()
-
-