use of me.earth.earthhack.impl.modules.combat.autoarmor.AutoArmor in project 3arthh4ck by 3arthqu4ke.
the class ListenerMotion method invoke.
@Override
public void invoke(MotionUpdateEvent event) {
if (!module.timer.passed(module.delay.getValue()) || !module.sort.getValue() || event.getStage() != Stage.PRE || !Managers.NCP.getClickTimer().passed(module.globalDelay.getValue()) || mc.player.isCreative() || !InventoryUtil.validScreen() || AUTO_ARMOR.returnIfPresent(AutoArmor::isActive, false) || !module.sortInInv.getValue() && mc.currentScreen instanceof GuiInventory || !module.sortInLoot.getValue() && !mc.world.getEntitiesWithinAABB(EntityItem.class, RotationUtil.getRotationPlayer().getEntityBoundingBox()).isEmpty() || CLEANER.isEnabled() && !CLEANER.get().getTimer().passed(CLEANER.get().getDelay() * 3L)) {
return;
}
InventoryLayout layout = module.current;
if (layout == null) {
return;
}
Item fallbackItem = null;
Item otherFallbackItem = null;
int fallback = -1;
int otherFallback = -1;
boolean emptyFallback = false;
Set<Item> missing = new HashSet<>();
for (int i = 44; i > 8; i--) {
ItemStack s = InventoryUtil.get(i);
Item shouldBeHere = layout.getItem(i);
if (shouldBeHere == s.getItem() || shouldBeHere == Items.AIR || missing.contains(shouldBeHere)) {
continue;
}
int slot = getSlot(shouldBeHere, s.getItem(), i, missing, layout);
if (slot == -2) {
return;
} else if (slot != -1 && (fallback == -1 || !emptyFallback && s.isEmpty())) {
fallback = slot;
otherFallback = i;
emptyFallback = s.isEmpty();
fallbackItem = InventoryUtil.get(i).getItem();
otherFallbackItem = shouldBeHere;
}
}
if (fallback != -1) {
click(fallback, otherFallback, fallbackItem, otherFallbackItem);
module.timer.reset();
}
}
use of me.earth.earthhack.impl.modules.combat.autoarmor.AutoArmor in project 3arthh4ck by 3arthqu4ke.
the class ModuleManager method init.
public void init() {
Earthhack.getLogger().info("Initializing Modules.");
this.forceRegister(new AutoConfig());
this.forceRegister(new ClickGui());
this.forceRegister(new Colors());
this.forceRegister(new Commands());
this.forceRegister(new Debug());
this.forceRegister(new FontMod());
this.forceRegister(new HUD());
this.forceRegister(new Management());
this.forceRegister(new Notifications());
this.forceRegister(new Compatibility());
this.forceRegister(new Safety());
this.forceRegister(new ServerModule());
this.forceRegister(new TabModule());
this.forceRegister(new Media());
this.forceRegister(new HudEditor());
this.forceRegister(new AntiSurround());
this.forceRegister(new AntiTrap());
this.forceRegister(new Auto32k());
this.forceRegister(new AnvilAura());
this.forceRegister(new AutoArmor());
this.forceRegister(new AutoCrystal());
this.forceRegister(new AutoTrap());
this.forceRegister(new BedBomb());
this.forceRegister(new BowSpam());
this.forceRegister(new BowKiller());
this.forceRegister(new Criticals());
this.forceRegister(new CrystalBomber());
this.forceRegister(new HoleFiller());
this.forceRegister(new KillAura());
this.forceRegister(new LegSwitch());
this.forceRegister(new Offhand());
this.forceRegister(new PistonAura());
this.forceRegister(new Surround());
this.forceRegister(new Snowballer());
this.forceRegister(new SelfTrap());
this.forceRegister(new WebAura());
this.forceRegister(new Announcer());
this.forceRegister(new AntiAim());
this.forceRegister(new AntiPackets());
this.forceRegister(new AntiPotion());
this.forceRegister(new AntiVanish());
this.forceRegister(new AutoEat());
this.forceRegister(new AutoFish());
this.forceRegister(new AutoLog());
this.forceRegister(new AutoReconnect());
this.forceRegister(new AutoRespawn());
this.forceRegister(new BuildHeight());
this.forceRegister(new Chat());
this.forceRegister(new ExtraTab());
this.forceRegister(new Logger());
this.forceRegister(new MCF());
this.forceRegister(new MobOwner());
this.forceRegister(new NoAFK());
this.forceRegister(new NoHandShake());
this.forceRegister(new NoInteract());
this.forceRegister(new NoInterp());
this.forceRegister(new NoSoundLag());
this.forceRegister(new Nuker());
this.forceRegister(new Packets());
this.forceRegister(new PingSpoof());
this.forceRegister(new Portals());
this.forceRegister(new SettingSpoof());
this.forceRegister(new SkinBlink());
this.forceRegister(new Spammer());
this.forceRegister(new ToolTips());
this.forceRegister(new TpsSync());
this.forceRegister(new Tracker());
this.forceRegister(new TrueDurability());
this.forceRegister(new AutoCraft());
this.forceRegister(new AutoRegear());
this.forceRegister(new PacketDelay());
this.forceRegister(new RPC());
this.forceRegister(new Anchor());
this.forceRegister(new AutoSprint());
this.forceRegister(new BlockLag());
this.forceRegister(new BoatFly());
this.forceRegister(new ElytraFlight());
this.forceRegister(new EntityControl());
this.forceRegister(new EntitySpeed());
this.forceRegister(new FastSwim());
this.forceRegister(new Flight());
this.forceRegister(new HighJump());
this.forceRegister(new ReverseStep());
this.forceRegister(new IceSpeed());
this.forceRegister(new Jesus());
this.forceRegister(new LongJump());
this.forceRegister(new NoFall());
this.forceRegister(new NoMove());
this.forceRegister(new NoSlowDown());
this.forceRegister(new PacketFly());
this.forceRegister(new Phase());
this.forceRegister(new SafeWalk());
this.forceRegister(new Speed());
this.forceRegister(new Step());
this.forceRegister(new Velocity());
this.forceRegister(new AutoMine());
this.forceRegister(new AutoTool());
this.forceRegister(new Blink());
this.forceRegister(new BlockTweaks());
this.forceRegister(new Cleaner());
this.forceRegister(new ExpTweaks());
this.forceRegister(new FakePlayer());
this.forceRegister(new FastPlace());
this.forceRegister(new FastEat());
this.forceRegister(new Freecam());
this.forceRegister(new LiquidInteract());
this.forceRegister(new MiddleClickPearl());
this.forceRegister(new MultiTask());
this.forceRegister(new NCPTweaks());
this.forceRegister(new NoGlitchBlocks());
this.forceRegister(new NoHunger());
this.forceRegister(new InventorySync());
this.forceRegister(new NoRotate());
this.forceRegister(new Arrows());
this.forceRegister(new RayTrace());
this.forceRegister(new Reach());
this.forceRegister(new Replenish());
this.forceRegister(new Scaffold());
this.forceRegister(new Sorter());
this.forceRegister(new Spectate());
this.forceRegister(new Speedmine());
this.forceRegister(new Suicide());
this.forceRegister(new Timer());
this.forceRegister(new XCarry());
this.forceRegister(new BlockHighlight());
this.forceRegister(new BreadCrumbs());
this.forceRegister(new Chams());
this.forceRegister(new ESP());
this.forceRegister(new Fullbright());
this.forceRegister(new HoleESP());
this.forceRegister(new LagOMeter());
this.forceRegister(new LogoutSpots());
this.forceRegister(new VoidESP());
this.forceRegister(new Nametags());
this.forceRegister(new NewChunks());
this.forceRegister(new NoRender());
this.forceRegister(new Search());
this.forceRegister(new Skeleton());
this.forceRegister(new Sounds());
this.forceRegister(new Tracers());
this.forceRegister(new CameraClip());
this.forceRegister(new ViewModel());
this.forceRegister(new XRay());
this.forceRegister(new CrystalScale());
this.forceRegister(new Trails());
this.forceRegister(new Trajectories());
this.forceRegister(new Penis());
this.forceRegister(new WayPoints());
this.forceRegister(new Weather());
this.forceRegister(new HandChams());
this.forceRegister(new CrystalChams());
this.forceRegister(new RainbowEnchant());
this.forceRegister(new Crosshair());
this.forceRegister(new PopChams());
this.forceRegister(new ItemChams());
this.forceRegister(new Ambience());
this.forceRegister(new PingBypass());
Bus.EVENT_BUS.post(new PostInitEvent());
}
use of me.earth.earthhack.impl.modules.combat.autoarmor.AutoArmor in project 3arthh4ck by 3arthqu4ke.
the class ListenerMotion method invoke.
@Override
public void invoke(MotionUpdateEvent event) {
if (module.action == null && !module.timer.passed(module.delay.getValue()) || !Managers.NCP.getClickTimer().passed(module.globalDelay.getValue()) || mc.player.isCreative() || !InventoryUtil.validScreen() || AUTO_ARMOR.returnIfPresent(AutoArmor::isActive, false) || !module.inInventory.getValue() && mc.currentScreen instanceof GuiInventory || !module.cleanInLoot.getValue() && !mc.world.getEntitiesWithinAABB(EntityItem.class, RotationUtil.getRotationPlayer().getEntityBoundingBox()).isEmpty() && (!module.cleanWithFull.getValue() || !isInvFull())) {
return;
}
if (event.getStage() == Stage.PRE) {
// TODO: use invalidate thingy to only calc when necessary?
if (module.stack.getValue() && stack() || module.xCarry.getValue() && doXCarry()) {
return;
}
Map<Item, ItemToDrop> items = new HashMap<>();
boolean prio = module.prioHotbar.getValue();
Item drag = null;
ItemStack draggedStack = mc.player.inventory.getItemStack();
if (check(draggedStack, -2, items)) {
drag = draggedStack.getItem();
} else if (!draggedStack.isEmpty()) {
return;
}
for (int i = prio ? 44 : 9; prio ? i > 8 : i <= 44; // noinspection ConstantConditions (??? am i stupid ???)
i = (prio ? --i : ++i)) {
ItemStack stack = InventoryUtil.get(i);
check(stack, i, items);
}
WindowClick action = null;
if (drag != null) {
ItemToDrop dragged = items.get(drag);
if (dragged != null && dragged.shouldDrop()) {
action = new WindowClick(-999, ItemStack.EMPTY, mc.player.inventory.getItemStack());
}
} else {
for (ItemToDrop toDrop : items.values()) {
if (toDrop.shouldDrop()) {
int s = toDrop.getSlot();
action = new WindowClick(-1, ItemStack.EMPTY, s, InventoryUtil.get(s), -1, p -> p.windowClick(0, s, 1, ClickType.THROW, mc.player));
break;
}
}
}
if (action != null) {
if (module.rotate.getValue()) {
if (MovementUtil.isMoving()) {
// behind us
event.setYaw(event.getYaw() - 180.0f);
} else {
event.setYaw(getYaw(event.getYaw()));
}
// slightly up so we throw further
event.setPitch(-5.0f);
module.action = action;
} else {
module.action = action;
module.runAction();
}
}
} else {
module.runAction();
}
}
Aggregations