Update Eat.java

This commit is contained in:
Danial
2021-10-07 12:51:38 +13:00
parent 7464f87e3a
commit 03582f6187
+1 -2
View File
@@ -14,7 +14,6 @@ public class Eat implements Strategy {
if (Variables.running
&& hasRequiredItems()
&& currentHealth > 0
&& Players.getMyPlayer().isInCombat()
&& currentHealth <= (Skill.HITPOINTS.getRealLevel() - Variables.fighting_food_heals_amount)
) {
Variables.setStatus("eating food");
@@ -28,7 +27,7 @@ public class Eat implements Strategy {
public void execute() {
try {
Inventory.getItem(Variables.fighting_food_to_eat + 1).interact(Items.Option.CONSUME);
Time.sleep(() -> Players.getMyPlayer().getHealth() != currentHealth || !Players.getMyPlayer().isInCombat(), 8000);
Time.sleep(() -> Players.getMyPlayer().getHealth() != currentHealth, 5000);
Variables.setStatus("none");
} catch (Exception ಠ_ಠ) {
System.out.println("Eating error: ¯\\_(ツ)_/¯");