use of mathax.client.systems.modules.Module in project Client by MatHax.
the class ModulesScreen method createFavoritesW.
protected boolean createFavoritesW(WWindow w) {
boolean hasFavorites = false;
for (Module module : Modules.get().getAll()) {
if (module.favorite) {
w.add(theme.module(module)).expandX();
hasFavorites = true;
}
}
return hasFavorites;
}
use of mathax.client.systems.modules.Module in project Client by MatHax.
the class AutoEat method startEating.
private void startEating() {
prevSlot = mc.player.getInventory().selectedSlot;
eat();
wasAura.clear();
if (pauseAuras.get()) {
for (Class<? extends Module> klass : AURAS) {
Module module = Modules.get().get(klass);
if (module.isActive()) {
wasAura.add(klass);
module.toggle();
}
}
}
wasBaritone = false;
if (pauseBaritone.get() && BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().isPathing()) {
wasBaritone = true;
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("pause");
}
}
use of mathax.client.systems.modules.Module in project Client by MatHax.
the class AutoGap method stopEating.
private void stopEating() {
changeSlot(prevSlot);
setPressed(false);
eating = false;
if (pauseAuras.get()) {
for (Class<? extends Module> klass : AURAS) {
Module module = Modules.get().get(klass);
if (wasAura.contains(klass) && !module.isActive()) {
module.toggle();
}
}
}
if (pauseBaritone.get() && wasBaritone)
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("resume");
}
use of mathax.client.systems.modules.Module in project Client by MatHax.
the class AutoGap method startEating.
private void startEating() {
prevSlot = mc.player.getInventory().selectedSlot;
eat();
// Pause auras
wasAura.clear();
if (pauseAuras.get()) {
for (Class<? extends Module> klass : AURAS) {
Module module = Modules.get().get(klass);
if (module.isActive()) {
wasAura.add(klass);
module.toggle();
}
}
}
wasBaritone = false;
if (pauseBaritone.get() && BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().isPathing()) {
wasBaritone = true;
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("pause");
}
}
use of mathax.client.systems.modules.Module in project Client by MatHax.
the class ModuleListSetting method load.
@Override
public List<Module> load(NbtCompound tag) {
get().clear();
NbtList valueTag = tag.getList("modules", 8);
for (NbtElement tagI : valueTag) {
Module module = Modules.get().get(tagI.asString());
if (module != null)
get().add(module);
}
return get();
}
Aggregations