Search in sources :

Example 1 with AntiHunger

use of mathax.client.systems.modules.player.AntiHunger in project Client by MatHax.

the class Sniper method onTick.

@EventHandler
public void onTick(TickEvent.Post event) {
    AntiHunger antiHunger = Modules.get().get(AntiHunger.class);
    NoFall noFall = Modules.get().get(NoFall.class);
    if (spoofed && !mc.options.useKey.isPressed()) {
        if (antiHungerPause.get() && !antiHunger.isActive())
            antiHunger.toggle();
        if (noFallPause.get() && !noFall.isActive())
            noFall.toggle();
    }
}
Also used : AntiHunger(mathax.client.systems.modules.player.AntiHunger) NoFall(mathax.client.systems.modules.movement.NoFall) EventHandler(mathax.client.eventbus.EventHandler)

Example 2 with AntiHunger

use of mathax.client.systems.modules.player.AntiHunger in project Client by MatHax.

the class Sniper method onTick.

@EventHandler
public void onTick(TickEvent.Pre event) {
    AntiHunger antiHunger = Modules.get().get(AntiHunger.class);
    NoFall noFall = Modules.get().get(NoFall.class);
    if ((isBow() && bows.get()) || (isTrident() && tridents.get())) {
        if (mc.player.getItemUseTime() > 0 && mc.options.useKey.isPressed()) {
            if (antiHungerPause.get() && antiHunger.isActive())
                antiHunger.toggle();
            if (noFallPause.get() && noFall.isActive())
                noFall.toggle();
        }
    }
}
Also used : AntiHunger(mathax.client.systems.modules.player.AntiHunger) NoFall(mathax.client.systems.modules.movement.NoFall) EventHandler(mathax.client.eventbus.EventHandler)

Aggregations

EventHandler (mathax.client.eventbus.EventHandler)2 NoFall (mathax.client.systems.modules.movement.NoFall)2 AntiHunger (mathax.client.systems.modules.player.AntiHunger)2