diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/player/AutoEat.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/player/AutoEat.java index d41edba613..befeb6ad77 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/player/AutoEat.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/player/AutoEat.java @@ -16,6 +16,9 @@ import meteordevelopment.meteorclient.systems.modules.combat.BedAura; import meteordevelopment.meteorclient.systems.modules.combat.CrystalAura; import meteordevelopment.meteorclient.systems.modules.combat.KillAura; +import meteordevelopment.meteorclient.systems.modules.world.Nuker; +import meteordevelopment.meteorclient.systems.modules.world.InfinityMiner; +import meteordevelopment.meteorclient.systems.modules.player.AutoFish; import meteordevelopment.meteorclient.utils.Utils; import meteordevelopment.meteorclient.utils.player.InvUtils; import meteordevelopment.meteorclient.utils.player.SlotUtils; @@ -31,7 +34,7 @@ import java.util.function.BiPredicate; public class AutoEat extends Module { - private static final Class[] AURAS = new Class[]{KillAura.class, CrystalAura.class, AnchorAura.class, BedAura.class}; + private static final Class[] MODULELIST = new Class[]{KillAura.class, CrystalAura.class, AnchorAura.class, BedAura.class, Nuker.class, InfinityMiner.class, AutoFish.class}; private final SettingGroup sgGeneral = settings.getDefaultGroup(); private final SettingGroup sgThreshold = settings.createGroup("Threshold"); @@ -56,9 +59,9 @@ public class AutoEat extends Module { .build() ); - private final Setting pauseAuras = sgGeneral.add(new BoolSetting.Builder() - .name("pause-auras") - .description("Pauses all auras when eating.") + private final Setting pauseModules = sgGeneral.add(new BoolSetting.Builder() + .name("pause-modules") + .description("Pauses all Auras, Nuker, InfinityMiner and AutoFish when eating.") .defaultValue(true) .build() ); @@ -166,10 +169,10 @@ private void startEating() { prevSlot = mc.player.getInventory().selectedSlot; eat(); - // Pause auras + // Pause Auras, Nuker, InfinityMiner and AutoFish wasAura.clear(); - if (pauseAuras.get()) { - for (Class klass : AURAS) { + if (pauseModules.get()) { + for (Class klass : MODULELIST) { Module module = Modules.get().get(klass); if (module.isActive()) { @@ -200,9 +203,9 @@ private void stopEating() { eating = false; - // Resume auras - if (pauseAuras.get()) { - for (Class klass : AURAS) { + // Resume Auras, Nuker, InfinityMiner and AutoFish + if (pauseModules.get()) { + for (Class klass : MODULELIST) { Module module = Modules.get().get(klass); if (wasAura.contains(klass) && !module.isActive()) { @@ -228,7 +231,8 @@ private void changeSlot(int slot) { } public boolean shouldEat() { - boolean health = mc.player.getHealth() <= healthThreshold.get(); + //The player should not try to eat when full even if the health is low. + boolean health = mc.player.getHealth() <= healthThreshold.get() && mc.player.getHungerManager().getFoodLevel() != 20; boolean hunger = mc.player.getHungerManager().getFoodLevel() <= hungerThreshold.get(); return thresholdMode.get().test(health, hunger);