Исходник KillAura FT | Duq client aka Expa 3.1

Начинающий
Статус
Онлайн
Регистрация
21 Фев 2024
Сообщения
113
Реакции[?]
0
Поинты[?]
0

Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:

  • бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
  • маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
  • приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
  • обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.

Спасибо!

Код:
package ware.deq.modules.impl.combat;

import com.google.common.eventbus.Subscribe;

import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.KeyBinding;
import ware.deq.Expensive;
import ware.deq.config.FriendStorage;
import ware.deq.events.EventInput;
import ware.deq.events.EventMotion;
import ware.deq.events.EventUpdate;
import ware.deq.modules.api.Category;
import ware.deq.modules.api.Module;
import ware.deq.modules.api.ModuleRegister;
import ware.deq.modules.settings.impl.BooleanSetting;
import ware.deq.modules.settings.impl.ModeListSetting;
import ware.deq.modules.settings.impl.ModeSetting;
import ware.deq.modules.settings.impl.SliderSetting;
import ware.deq.ui.oldclickgui.ClickGuiScreen;
import ware.deq.utils.math.MathUtil;
import ware.deq.utils.math.SensUtils;
import ware.deq.utils.math.StopWatch;
import ware.deq.utils.player.*;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.entity.player.RemoteClientPlayerEntity;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.IngameMenuScreen;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.item.ArmorStandEntity;
import net.minecraft.entity.merchant.villager.VillagerEntity;
import net.minecraft.entity.monster.MonsterEntity;
import net.minecraft.entity.monster.SlimeEntity;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.item.UseAction;
import net.minecraft.network.play.client.CHeldItemChangePacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

import static java.lang.Math.hypot;
import static net.minecraft.util.math.MathHelper.clamp;
import static net.minecraft.util.math.MathHelper.wrapDegrees;

@ModuleRegister(name = "Aura", category = Category.Fighting)
public class HitAura extends Module {
    @Getter
    final ModeSetting type = new ModeSetting("Тип", "Плавная", "Плавная", "Резкая", "Matrix");
    final ModeSetting speedType = new ModeSetting("Скорость ротации", "Средняя", "Быстрая", "Средняя", "Медленная").setVisible(() -> !type.is("Matrix"));
    final SliderSetting attackRange = new SliderSetting("Дистанция аттаки", 3f, 2.5f, 6f, 0.05f);
    final SliderSetting elytraRange = new SliderSetting("Дистанция на элитре", 6f, 0f, 16f, 0.05f);
    final SliderSetting preRange = new SliderSetting("Дистанция наводки", 0.3f, 0f, 3f, 0.05f).setVisible(() -> !type.is("Резкая"));
    final SliderSetting tick = new SliderSetting("Тики", 2f, 1f, 10f, 1f).setVisible(() -> type.is("Резкая"));
    final ModeListSetting targets = new ModeListSetting("Таргеты",
            new BooleanSetting("Игроки", true),
            new BooleanSetting("Голые", true),
            new BooleanSetting("Мобы", false),
            new BooleanSetting("Животные", false),
            new BooleanSetting("Друзья", false),
            new BooleanSetting("Голые невидимки", true),
            new BooleanSetting("Невидимки", true)
    );

    final ModeListSetting consider = new ModeListSetting("Учитывать",
            new BooleanSetting("Хп", true),
            new BooleanSetting("Броню", true),
            new BooleanSetting("Дистанцию", true),
            new BooleanSetting("Баффы", true)
    );

    @Getter
    final ModeListSetting options = new ModeListSetting("Опции",
            new BooleanSetting("Только криты", true),
            new BooleanSetting("Ломать щит", true),
            new BooleanSetting("Отжимать щит", false),
            new BooleanSetting("Ускорять ротацию при атаке", false),
            new BooleanSetting("Синхронизировать с TPS", false),
            new BooleanSetting("Фокусировать одну цель", true),
            new BooleanSetting("Коррекция движения", true),
            new BooleanSetting("Оптимальная дистанция атаки", false),
            new BooleanSetting("Декодер", true)
    );

    @Getter
    final ModeListSetting moreOptions = new ModeListSetting("Триггеры",
            new BooleanSetting("Проверка луча", true),
            new BooleanSetting("Перелетать противника", true),
            new BooleanSetting("Бить через стены", true),
            new BooleanSetting("Не бить если кушаешь", false),
            new BooleanSetting("Не бить если в гуи", false)
    );
    final SliderSetting elytraForward = new SliderSetting("Значение перелета", 3.5f, 0.5f, 8, 0.05f).setVisible(() -> moreOptions.getValueByName("Перелетать противника").get());

    public BooleanSetting wallBypass = new BooleanSetting("HolyWalls ", false).setVisible(() -> moreOptions.getValueByName("Бить через стены").get());
    public BooleanSetting noRotate = new BooleanSetting("Наводиться", false).setVisible(() -> (moreOptions.getValueByName("Не бить если кушаешь").get() || moreOptions.getValueByName("Не бить если в гуи").get()));
    public BooleanSetting smartCrits = new BooleanSetting("Умные криты", false).setVisible(() -> (options.getValueByName("Только криты").get()));
    final ModeSetting correctionType = new ModeSetting("Тип коррекции", "Незаметный", "Незаметный", "Сфокусированный").setVisible(() -> options.getValueByName("Коррекция движения").get());
    public BooleanSetting bypassFT = new BooleanSetting("Обход ", false);
    @Getter
    private final StopWatch stopWatch = new StopWatch();
    public Vector2f rotateVector = new Vector2f(0, 0);
    @Getter
    @Setter
    private LivingEntity target;
    private Entity selected;

    float health = 0f;
    int ticks = 0;
    boolean isRotated = false;
    boolean canWork = true, tpAuraRule = false;
    StopWatch yawUpdate = new StopWatch();
    StopWatch pitchUpdate = new StopWatch();

    final PotionThrower autoPotion;

    float aimDistance() {
        return (!type.is("Резкая") ? preRange.get() : 0);
    }

    float maxRange() {
        return attackDistance() + (mc.player.isElytraFlying() ? elytraRange.get() : 0) + aimDistance();
    }

    public HitAura(PotionThrower autoPotion) {
        this.autoPotion = autoPotion;
        addSettings(type, speedType, attackRange, preRange, elytraRange, tick, targets, consider, options, moreOptions, elytraForward, wallBypass, smartCrits, noRotate, correctionType);
    }

    @Subscribe
    public void onInput(EventInput eventInput) {
        if (options.getValueByName("Коррекция движения").get() && correctionType.is("Незаметный") && canWork) {
            MoveUtils.fixMovement(eventInput, rotateVector.x);
        }
    }

    @Subscribe
    public void onUpdate(EventUpdate e) {
        if (!canWork) return;

        if (options.getValueByName("Фокусировать одну цель").get() && (target == null || !isValid(target)) || !options.getValueByName("Фокусировать одну цель").get()) {
            updateTarget();
        }

        if (options.getValueByName("Декодер").get()) {
            resolvePlayers();
            releaseResolver();
        }

        if (target != null && !(autoPotion.isState() && autoPotion.isActive())) {
            float rotateSpeedYaw = (speedType.is("Средняя") ? (type.is("Плавная") ? 115 : 180) : 40);
            float rotateSpeedPitch = (speedType.is("Средняя") ? (type.is("Плавная") ? 65 : 90) : 35);
            isRotated = false;
            if (type.is("Резкая")) {
                if (ticks > 0 || mc.player.isElytraFlying()) {
                    setRotate(rotateSpeedYaw, rotateSpeedPitch);
                    ticks--;
                } else {
                    reset();
                }
            } else {
                if (!isRotated) {
                    setRotate(rotateSpeedYaw, rotateSpeedPitch);
                }
            }

        } else {
            stopWatch.setLastMS(0);
            reset();
        }

        if (target != null && isRotated && !mc.player.isElytraFlying() && mc.player.getDistanceEyePos(target) <= attackDistance()) {
            critHelper();
        }
    }

    @Subscribe
    private void onWalking(EventMotion e) {
        if (target == null || autoPotion.isState() && autoPotion.isActive() || !canWork) return;

        float yaw = rotateVector.x;
        float pitch = rotateVector.y;

        e.setYaw(yaw);
        e.setPitch(pitch);
        mc.player.rotationYawHead = yaw;
        mc.player.renderYawOffset = PlayerUtils.calculateCorrectYawOffset(yaw);
        mc.player.rotationPitchHead = pitch;
    }

    public void setRotate(float yawSpeed, float pitchSpeed) {

            baseRotation(yawSpeed, pitchSpeed);

        if (moreOptions.getValueByName("Не бить если кушаешь").get() && mc.player.isHandActive() && mc.player.getHeldItemOffhand().getUseAction() == UseAction.EAT && !noRotate.get()) {
            rotateVector = new Vector2f(mc.player.rotationYaw, mc.player.rotationPitch);
        }

        if (moreOptions.getValueByName("Не бить если в гуи").get() && !noRotate.get()) {
            if (mc.currentScreen != null && !(mc.currentScreen instanceof ClickGuiScreen || mc.currentScreen instanceof ChatScreen || mc.currentScreen instanceof IngameMenuScreen)) {
                rotateVector = new Vector2f(mc.player.rotationYaw, mc.player.rotationPitch);
            }
        }
    }

    public float attackDistance() {
        if (options.getValueByName("Оптимальная дистанция атаки").get() && !Expensive.getInstance().getModuleManager().getTPInfluence().isState()) {
            if (!mc.player.isSwimming())
                return  3.6f;
            else
                return  3.0f;
        }

        if (Expensive.getInstance().getModuleManager().getTPInfluence().isState()) {
            return Expensive.getInstance().getModuleManager().getTPInfluence().range.get();
        }

        return attackRange.get();
    }

    public void resolvePlayers() {
        for (PlayerEntity player : mc.world.getPlayers()) {
            if (player instanceof RemoteClientPlayerEntity) {
                ((RemoteClientPlayerEntity) player).resolve();
            }
        }
    }

    public void releaseResolver() {
        for (PlayerEntity player : mc.world.getPlayers()) {
            if (player instanceof RemoteClientPlayerEntity) {
                ((RemoteClientPlayerEntity) player).releaseResolver();
            }
        }
    }

    private void updateTarget() {
        List<LivingEntity> targets = new ArrayList<>();

        for (Entity entity : mc.world.getAllEntities()) {
            if (!(entity instanceof LivingEntity living)) continue;
            if (!this.isValid(living)) continue;

            targets.add(living);
        }

        if (targets.isEmpty()) {
            target = null;
            return;
        }

        if (targets.size() == 1) {
            target = targets.get(0);
            return;
        }

        targets.sort(Comparator.comparingDouble(entity -> MathUtil.entity(entity, consider.getValueByName("Хп").get(), consider.getValueByName("Броню").get(), consider.getValueByName("Дистанцию").get(), maxRange(), consider.getValueByName("Баффы").get())));
        target = targets.get(0);
    }

    float lastYaw, lastPitch;

    private void smartRotation() {
        isRotated = true;
        Vector3d vec3d = target.getPositionVec().add(0, clamp(mc.player.getPosYEye() - target.getPosY(), 0, target.getHeight() * (mc.player.getDistanceEyePos(target) / attackDistance())), 0).subtract(mc.player.getEyePosition(1.0F));

        if (mc.player.isElytraFlying()) {
            if (moreOptions.getValueByName("Перелетать противника").get()) {
                Vector3d targetPosition = target.getPositionVec();
                Vector3d scale = target.getForward().normalize().scale(elytraForward.get());
                vec3d = targetPosition.add(scale);
            } else {
                vec3d = MathUtil.getVector(target);
            }
        }
        double vecX = vec3d.x - ((mc.player.isElytraFlying() && moreOptions.getValueByName("Перелетать противника").get()) ? mc.player.getPosX() : 0);
        double vecY = vec3d.y - ((mc.player.isElytraFlying() && moreOptions.getValueByName("Перелетать противника").get()) ? mc.player.getPosY() : 0);
        double vecZ = vec3d.z - ((mc.player.isElytraFlying() && moreOptions.getValueByName("Перелетать противника").get()) ? mc.player.getPosZ() : 0);
        float[] rotations = new float[]{(float)Math.toDegrees(Math.atan2(vecZ, vecX)) - 90.0F, (float)(-Math.toDegrees(Math.atan2(vecY, Math.hypot(vecX, vecZ))))};
        float deltaYaw = MathHelper.wrapDegrees(MathUtil.calculateDelta(rotations[0], rotateVector.x));
        float deltaPitch = MathUtil.calculateDelta(rotations[1], rotateVector.y);
        float limitedYaw = Math.min(Math.max(Math.abs(deltaYaw), 1.0F), 360);
        float limitedPitch = Math.min(Math.max(Math.abs(deltaPitch), 1.0F), 90);
        float finalYaw = rotateVector.x + (deltaYaw > 0.0F ? limitedYaw : -limitedYaw);
        float finalPitch = MathHelper.clamp(rotateVector.y + (deltaPitch > 0.0F ? limitedPitch : -limitedPitch), -90.0F, 90.0F);
        float gcd = SensUtils.getGCDValue();
        finalYaw = finalYaw - (finalYaw - rotateVector.x) % gcd;
        finalPitch = finalPitch - (finalPitch - rotateVector.y) % gcd;

        rotateVector = new Vector2f(finalYaw, finalPitch);

        if (options.getValueByName("Коррекция движения").get()) {
            mc.player.rotationYawOffset = finalYaw;
        }
    }

    private void baseRotation(float rotationYawSpeed, float rotationPitchSpeed) {
        Vector3d vec = target.getPositionVec().add(0, clamp(mc.player.getPosYEye() - target.getPosY(), 0, target.getHeight() * (mc.player.getDistanceEyePos(target) / attackDistance())), 0).subtract(mc.player.getEyePosition(1.0F));
        isRotated = true;

        float yawToTarget = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90);
        float pitchToTarget = (float) (-Math.toDegrees(Math.atan2(vec.y, hypot(vec.x, vec.z))));

        float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
        float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);

        int roundedYaw = (int) yawDelta;

        float clampedYaw1;
        float clampedPitch1;
        int roundYawDelta = (int) Math.abs(yawDelta);
        int roundPitchDelta = (int) Math.abs(pitchDelta);
        float yaw, pitch;
        float gcd;

        switch (type.get()) {
            case "Matrix" -> {
                float rotationSpeedX = 0.68F + (float) Math.random() * 0.25F;
                float rotationSpeedY = 0.6F + (float) Math.random() * 0.2F;
                yaw = rotateVector.x + yawDelta * rotationSpeedX;
                pitch = clamp(rotateVector.y + pitchDelta * rotationSpeedY, -89,89);
                gcd = SensUtils.getGCDValue();
                yaw -= (yaw - rotateVector.x) % gcd;
                pitch -= (pitch - rotateVector.y) % gcd;
                rotateVector = new Vector2f(yaw, pitch);
                if (options.getValueByName("Коррекция движения").get()) {
                    Minecraft.player.rotationYawOffset = yaw;
                }
                if (Math.random() > 0.6) {
                    yaw += (Math.random() - 0.5) * 0.2;
                    pitch += (Math.random() - 0.5) * 0.15;
                }
                float attackCooldown = 0.75F + (float) Math.random() * 0.1F;
                if (Minecraft.player.getCooledAttackStrength(0) > attackCooldown) {
                }
            }

            case "Плавная" -> {
                float rotationSpeedX = 0.38F + (float) Math.random() * 0.25F;
                float rotationSpeedY = 0.1F + (float) Math.random() * 0.2F;
                yaw = rotateVector.x + yawDelta * rotationSpeedX;
                pitch = clamp(rotateVector.y + pitchDelta * rotationSpeedY, -89,89);
                gcd = SensUtils.getGCDValue();
                yaw -= (yaw - rotateVector.x) % gcd;
                pitch -= (pitch - rotateVector.y) % gcd;
                rotateVector = new Vector2f(yaw, pitch);
                if (options.getValueByName("Коррекция движения").get()) {
                    Minecraft.player.rotationYawOffset = yaw;
                }
                if (Math.random() > 0.6) {
                    yaw += (Math.random() - 0.5) * 0.2;
                    pitch += (Math.random() - 0.5) * 0.15;
                }
                float attackCooldown = 0.75F + (float) Math.random() * 0.1F;
                if (Minecraft.player.getCooledAttackStrength(0) > attackCooldown) {
                }
            }
            case "Резкая" -> {
                yaw = rotateVector.x + yawDelta;
                pitch = clamp(rotateVector.y + pitchDelta, -90, 90);

                gcd = SensUtils.getGCDValue();
                yaw -= (yaw - rotateVector.x) % gcd;
                pitch -= (pitch - rotateVector.y) % gcd;

                rotateVector = new Vector2f(yaw, pitch);

                if (options.getValueByName("Коррекция движения").get()) {
                    mc.player.rotationYawOffset = yaw;
                }
            }
        }
    }

    public void critHelper() {
    }

    private void updateAttack() {
        selected = MouseUtil.getMouseOver(target, rotateVector.x, rotateVector.y, attackDistance());
        if ((mc.player.getDistanceEyePos(target)) > attackDistance()) {
            return;
        }

        if (moreOptions.getValueByName("Проверка луча").get() && !moreOptions.getValueByName("Перелетать противника").get() && !mc.player.isElytraFlying()) {
            if (selected == null) {
                return;
            }
        }

        if (mc.player.isBlocking() && options.getValueByName("Отжимать щит").get()) {
            mc.playerController.onStoppedUsingItem(mc.player);
        }

        if (!moreOptions.getValueByName("Бить через стены").get()) {
            if (!mc.player.canEntityBeSeen(target)) {
                return;
            }
        } else {
            if (wallBypass.get() && !mc.player.canEntityBeSeen(target)) {
                target.getPosition().add(MathUtil.random(-0.15F, 0.15F), target.getBoundingBox().getYSize(), MathUtil.random(-0.15F, 0.15F));
            }
        }

        if (moreOptions.getValueByName("Не бить если кушаешь").get()) {
            if (mc.player.isHandActive() && mc.player.getHeldItemOffhand().getUseAction() == UseAction.EAT) {
                return;
            }
        }

        if (moreOptions.getValueByName("Не бить если в гуи").get()) {
            if (mc.currentScreen != null && !(mc.currentScreen instanceof ClickGuiScreen || mc.currentScreen instanceof ChatScreen || mc.currentScreen instanceof IngameMenuScreen))
                return;
        }

        tpAuraRule = true;

        if (options.getValueByName("Ускорять ротацию при атаке").get()) {
            setRotate(70, 45);
        }

        stopWatch.setLastMS(500);
        Criticals.cancelCrit = true;
        if (Expensive.getInstance().getModuleManager().getCriticals().isState()) Expensive.getInstance().getModuleManager().getCriticals().sendCrit();
        mc.playerController.attackEntity(mc.player, target);
        mc.player.swingArm(Hand.MAIN_HAND);
        Criticals.cancelCrit = false;
        if (bypassFT.get()) {
            randomAttack(target);
        }
        if (target instanceof PlayerEntity player && options.getValueByName("Ломать щит").get()) {
            breakShieldPlayer(player);
        }
    }

    private void randomAttack(LivingEntity target){
        final KeyBinding[] pressedKeys = {mc.gameSettings.keyBindLeft, mc.gameSettings.keyBindRight};
        Vector3d vec = target.getPositionVec().add(0, clamp(mc.player.getPosYEye() - target.getPosY(),
                        0, target.getHeight() * (mc.player.getDistanceEyePos(target) / attackRange.get())), 0)
                .subtract(mc.player.getEyePosition(1.0F));
        float yawToTarget = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90);
        float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
        float yaw;
        float rotationSpeedX = 56;
        yaw = rotateVector.x + yawDelta * rotationSpeedX;

        float random = MathUtil.random(Math.min(1,2), Math.max(3, 4));
        float randomYaw = MathUtil.random(Math.min(1,2), Math.max(3, 4));
        float randomCrit = MathUtil.random(3,5);
        if (random == 1 || random == 2) {
            mc.player.setSprinting(false);
            mc.playerController.attackEntity(mc.player, target);
            mc.player.swingArm(Hand.MAIN_HAND);
            System.out.println("Attack");

        }
//        for (KeyBinding keyBinding : pressedKeys) {
//            if(randomYaw == 1) {
//                System.out.println("Rotation");
//                if (keyBinding.pressed) {
//                    mc.player.rotationYawHead = yaw + 9;
//                }
//            } if (randomYaw <= 1 ){
//                System.out.println("noRotation");
//            }
//       }

        if (random == 3 ) {
            System.out.println("noAttack");
        }
    }

    public boolean shouldPlayerFalling() {
        return AttackUtil.isPlayerFalling(options.getValueByName("Только криты").get() && !(Expensive.getInstance().getModuleManager().getCriticals().isState()), smartCrits.get(), options.getValueByName("Синхронизировать с TPS").get());
    }

    private boolean isValid(LivingEntity entity) {
        if (entity instanceof ClientPlayerEntity) return false;

        if (entity.ticksExisted < 3) return false;
        if ((mc.player.getDistanceEyePos(entity)) > maxRange()) return false;

        if (entity instanceof PlayerEntity p) {
            if (AntiBot.isBot(entity)) {
                return false;
            }
            if (!targets.getValueByName("Друзья").get() && FriendStorage.isFriend(p.getName().getString())) {
                return false;
            }

            if (p.getName().getString().equalsIgnoreCase(mc.player.getName().getString())) return false;
        }

        if (entity instanceof PlayerEntity && !targets.getValueByName("Игроки").get()) {
            return false;
        }
        if (entity instanceof PlayerEntity && entity.getTotalArmorValue() == 0 && !targets.getValueByName("Голые").get()) {
            return false;
        }
        if (entity instanceof PlayerEntity && entity.isInvisible() && entity.getTotalArmorValue() == 0 && !targets.getValueByName("Голые невидимки").get()) {
            return false;
        }

        if (entity instanceof PlayerEntity && entity.isInvisible() && !targets.getValueByName("Невидимки").get()) {
            return false;
        }

        if (entity instanceof PlayerEntity && ((PlayerEntity) entity).isCreative()) {
            return false;
        }

        if ((entity instanceof MonsterEntity || entity instanceof SlimeEntity || entity instanceof VillagerEntity) && !targets.getValueByName("Мобы").get()) {
            return false;
        }
        if (entity instanceof AnimalEntity && !targets.getValueByName("Животные").get()) {
            return false;
        }

        return !entity.isInvulnerable() && entity.isAlive() && !(entity instanceof ArmorStandEntity);
    }

    private void breakShieldPlayer(PlayerEntity entity) {
        if (entity.isBlocking()) {
            int invSlot = InventoryUtil.getInstance().getAxeInInventory(false);
            int hotBarSlot = InventoryUtil.getInstance().getAxeInInventory(true);

            if (hotBarSlot == -1 && invSlot != -1) {
                int bestSlot = InventoryUtil.getInstance().findBestSlotInHotBar();
                mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, mc.player);
                mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, mc.player);

                mc.player.connection.sendPacket(new CHeldItemChangePacket(bestSlot));
                mc.playerController.attackEntity(mc.player, entity);
                mc.player.swingArm(Hand.MAIN_HAND);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem));

                mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, mc.player);
                mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, mc.player);
            }

            if (hotBarSlot != -1) {
                mc.player.connection.sendPacket(new CHeldItemChangePacket(hotBarSlot));
                mc.playerController.attackEntity(mc.player, entity);
                mc.player.swingArm(Hand.MAIN_HAND);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem));
            }
        }
    }


    private void reset() {
        if (options.getValueByName("Коррекция движения").get()) {
            mc.player.rotationYawOffset = Integer.MIN_VALUE;
        }
        rotateVector = new Vector2f(mc.player.rotationYaw, mc.player.rotationPitch);
    }

    @Override
    public boolean onEnable() {
        super.onEnable();
        reset();
        target = null;
        return false;
    }

    @Override
    public void onDisable() {
        super.onDisable();
        reset();
        stopWatch.setLastMS(0);
        target = null;
        mc.timer.timerSpeed = 1;
    }
}

Код сделан щас за 5 минут правда скажу что слил ещё в сурсах но там была паста vortex(noad) и всё был в var поетому чтобыгласам было удобней смотреть на это вот сделал так за сам обход не бейте он ещё вроде работет
 
Начинающий
Статус
Онлайн
Регистрация
21 Фев 2024
Сообщения
113
Реакции[?]
0
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
20 Сен 2024
Сообщения
40
Реакции[?]
0
Поинты[?]
0
Код:
package ware.deq.modules.impl.combat;

import com.google.common.eventbus.Subscribe;

import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.KeyBinding;
import ware.deq.Expensive;
import ware.deq.config.FriendStorage;
import ware.deq.events.EventInput;
import ware.deq.events.EventMotion;
import ware.deq.events.EventUpdate;
import ware.deq.modules.api.Category;
import ware.deq.modules.api.Module;
import ware.deq.modules.api.ModuleRegister;
import ware.deq.modules.settings.impl.BooleanSetting;
import ware.deq.modules.settings.impl.ModeListSetting;
import ware.deq.modules.settings.impl.ModeSetting;
import ware.deq.modules.settings.impl.SliderSetting;
import ware.deq.ui.oldclickgui.ClickGuiScreen;
import ware.deq.utils.math.MathUtil;
import ware.deq.utils.math.SensUtils;
import ware.deq.utils.math.StopWatch;
import ware.deq.utils.player.*;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.entity.player.RemoteClientPlayerEntity;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.IngameMenuScreen;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.item.ArmorStandEntity;
import net.minecraft.entity.merchant.villager.VillagerEntity;
import net.minecraft.entity.monster.MonsterEntity;
import net.minecraft.entity.monster.SlimeEntity;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.item.UseAction;
import net.minecraft.network.play.client.CHeldItemChangePacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

import static java.lang.Math.hypot;
import static net.minecraft.util.math.MathHelper.clamp;
import static net.minecraft.util.math.MathHelper.wrapDegrees;

@ModuleRegister(name = "Aura", category = Category.Fighting)
public class HitAura extends Module {
    @Getter
    final ModeSetting type = new ModeSetting("Тип", "Плавная", "Плавная", "Резкая", "Matrix");
    final ModeSetting speedType = new ModeSetting("Скорость ротации", "Средняя", "Быстрая", "Средняя", "Медленная").setVisible(() -> !type.is("Matrix"));
    final SliderSetting attackRange = new SliderSetting("Дистанция аттаки", 3f, 2.5f, 6f, 0.05f);
    final SliderSetting elytraRange = new SliderSetting("Дистанция на элитре", 6f, 0f, 16f, 0.05f);
    final SliderSetting preRange = new SliderSetting("Дистанция наводки", 0.3f, 0f, 3f, 0.05f).setVisible(() -> !type.is("Резкая"));
    final SliderSetting tick = new SliderSetting("Тики", 2f, 1f, 10f, 1f).setVisible(() -> type.is("Резкая"));
    final ModeListSetting targets = new ModeListSetting("Таргеты",
            new BooleanSetting("Игроки", true),
            new BooleanSetting("Голые", true),
            new BooleanSetting("Мобы", false),
            new BooleanSetting("Животные", false),
            new BooleanSetting("Друзья", false),
            new BooleanSetting("Голые невидимки", true),
            new BooleanSetting("Невидимки", true)
    );

    final ModeListSetting consider = new ModeListSetting("Учитывать",
            new BooleanSetting("Хп", true),
            new BooleanSetting("Броню", true),
            new BooleanSetting("Дистанцию", true),
            new BooleanSetting("Баффы", true)
    );

    @Getter
    final ModeListSetting options = new ModeListSetting("Опции",
            new BooleanSetting("Только криты", true),
            new BooleanSetting("Ломать щит", true),
            new BooleanSetting("Отжимать щит", false),
            new BooleanSetting("Ускорять ротацию при атаке", false),
            new BooleanSetting("Синхронизировать с TPS", false),
            new BooleanSetting("Фокусировать одну цель", true),
            new BooleanSetting("Коррекция движения", true),
            new BooleanSetting("Оптимальная дистанция атаки", false),
            new BooleanSetting("Декодер", true)
    );

    @Getter
    final ModeListSetting moreOptions = new ModeListSetting("Триггеры",
            new BooleanSetting("Проверка луча", true),
            new BooleanSetting("Перелетать противника", true),
            new BooleanSetting("Бить через стены", true),
            new BooleanSetting("Не бить если кушаешь", false),
            new BooleanSetting("Не бить если в гуи", false)
    );
    final SliderSetting elytraForward = new SliderSetting("Значение перелета", 3.5f, 0.5f, 8, 0.05f).setVisible(() -> moreOptions.getValueByName("Перелетать противника").get());

    public BooleanSetting wallBypass = new BooleanSetting("HolyWalls ", false).setVisible(() -> moreOptions.getValueByName("Бить через стены").get());
    public BooleanSetting noRotate = new BooleanSetting("Наводиться", false).setVisible(() -> (moreOptions.getValueByName("Не бить если кушаешь").get() || moreOptions.getValueByName("Не бить если в гуи").get()));
    public BooleanSetting smartCrits = new BooleanSetting("Умные криты", false).setVisible(() -> (options.getValueByName("Только криты").get()));
    final ModeSetting correctionType = new ModeSetting("Тип коррекции", "Незаметный", "Незаметный", "Сфокусированный").setVisible(() -> options.getValueByName("Коррекция движения").get());
    public BooleanSetting bypassFT = new BooleanSetting("Обход ", false);
    @Getter
    private final StopWatch stopWatch = new StopWatch();
    public Vector2f rotateVector = new Vector2f(0, 0);
    @Getter
    @Setter
    private LivingEntity target;
    private Entity selected;

    float health = 0f;
    int ticks = 0;
    boolean isRotated = false;
    boolean canWork = true, tpAuraRule = false;
    StopWatch yawUpdate = new StopWatch();
    StopWatch pitchUpdate = new StopWatch();

    final PotionThrower autoPotion;

    float aimDistance() {
        return (!type.is("Резкая") ? preRange.get() : 0);
    }

    float maxRange() {
        return attackDistance() + (mc.player.isElytraFlying() ? elytraRange.get() : 0) + aimDistance();
    }

    public HitAura(PotionThrower autoPotion) {
        this.autoPotion = autoPotion;
        addSettings(type, speedType, attackRange, preRange, elytraRange, tick, targets, consider, options, moreOptions, elytraForward, wallBypass, smartCrits, noRotate, correctionType);
    }

    @Subscribe
    public void onInput(EventInput eventInput) {
        if (options.getValueByName("Коррекция движения").get() && correctionType.is("Незаметный") && canWork) {
            MoveUtils.fixMovement(eventInput, rotateVector.x);
        }
    }

    @Subscribe
    public void onUpdate(EventUpdate e) {
        if (!canWork) return;

        if (options.getValueByName("Фокусировать одну цель").get() && (target == null || !isValid(target)) || !options.getValueByName("Фокусировать одну цель").get()) {
            updateTarget();
        }

        if (options.getValueByName("Декодер").get()) {
            resolvePlayers();
            releaseResolver();
        }

        if (target != null && !(autoPotion.isState() && autoPotion.isActive())) {
            float rotateSpeedYaw = (speedType.is("Средняя") ? (type.is("Плавная") ? 115 : 180) : 40);
            float rotateSpeedPitch = (speedType.is("Средняя") ? (type.is("Плавная") ? 65 : 90) : 35);
            isRotated = false;
            if (type.is("Резкая")) {
                if (ticks > 0 || mc.player.isElytraFlying()) {
                    setRotate(rotateSpeedYaw, rotateSpeedPitch);
                    ticks--;
                } else {
                    reset();
                }
            } else {
                if (!isRotated) {
                    setRotate(rotateSpeedYaw, rotateSpeedPitch);
                }
            }

        } else {
            stopWatch.setLastMS(0);
            reset();
        }

        if (target != null && isRotated && !mc.player.isElytraFlying() && mc.player.getDistanceEyePos(target) <= attackDistance()) {
            critHelper();
        }
    }

    @Subscribe
    private void onWalking(EventMotion e) {
        if (target == null || autoPotion.isState() && autoPotion.isActive() || !canWork) return;

        float yaw = rotateVector.x;
        float pitch = rotateVector.y;

        e.setYaw(yaw);
        e.setPitch(pitch);
        mc.player.rotationYawHead = yaw;
        mc.player.renderYawOffset = PlayerUtils.calculateCorrectYawOffset(yaw);
        mc.player.rotationPitchHead = pitch;
    }

    public void setRotate(float yawSpeed, float pitchSpeed) {

            baseRotation(yawSpeed, pitchSpeed);

        if (moreOptions.getValueByName("Не бить если кушаешь").get() && mc.player.isHandActive() && mc.player.getHeldItemOffhand().getUseAction() == UseAction.EAT && !noRotate.get()) {
            rotateVector = new Vector2f(mc.player.rotationYaw, mc.player.rotationPitch);
        }

        if (moreOptions.getValueByName("Не бить если в гуи").get() && !noRotate.get()) {
            if (mc.currentScreen != null && !(mc.currentScreen instanceof ClickGuiScreen || mc.currentScreen instanceof ChatScreen || mc.currentScreen instanceof IngameMenuScreen)) {
                rotateVector = new Vector2f(mc.player.rotationYaw, mc.player.rotationPitch);
            }
        }
    }

    public float attackDistance() {
        if (options.getValueByName("Оптимальная дистанция атаки").get() && !Expensive.getInstance().getModuleManager().getTPInfluence().isState()) {
            if (!mc.player.isSwimming())
                return  3.6f;
            else
                return  3.0f;
        }

        if (Expensive.getInstance().getModuleManager().getTPInfluence().isState()) {
            return Expensive.getInstance().getModuleManager().getTPInfluence().range.get();
        }

        return attackRange.get();
    }

    public void resolvePlayers() {
        for (PlayerEntity player : mc.world.getPlayers()) {
            if (player instanceof RemoteClientPlayerEntity) {
                ((RemoteClientPlayerEntity) player).resolve();
            }
        }
    }

    public void releaseResolver() {
        for (PlayerEntity player : mc.world.getPlayers()) {
            if (player instanceof RemoteClientPlayerEntity) {
                ((RemoteClientPlayerEntity) player).releaseResolver();
            }
        }
    }

    private void updateTarget() {
        List<LivingEntity> targets = new ArrayList<>();

        for (Entity entity : mc.world.getAllEntities()) {
            if (!(entity instanceof LivingEntity living)) continue;
            if (!this.isValid(living)) continue;

            targets.add(living);
        }

        if (targets.isEmpty()) {
            target = null;
            return;
        }

        if (targets.size() == 1) {
            target = targets.get(0);
            return;
        }

        targets.sort(Comparator.comparingDouble(entity -> MathUtil.entity(entity, consider.getValueByName("Хп").get(), consider.getValueByName("Броню").get(), consider.getValueByName("Дистанцию").get(), maxRange(), consider.getValueByName("Баффы").get())));
        target = targets.get(0);
    }

    float lastYaw, lastPitch;

    private void smartRotation() {
        isRotated = true;
        Vector3d vec3d = target.getPositionVec().add(0, clamp(mc.player.getPosYEye() - target.getPosY(), 0, target.getHeight() * (mc.player.getDistanceEyePos(target) / attackDistance())), 0).subtract(mc.player.getEyePosition(1.0F));

        if (mc.player.isElytraFlying()) {
            if (moreOptions.getValueByName("Перелетать противника").get()) {
                Vector3d targetPosition = target.getPositionVec();
                Vector3d scale = target.getForward().normalize().scale(elytraForward.get());
                vec3d = targetPosition.add(scale);
            } else {
                vec3d = MathUtil.getVector(target);
            }
        }
        double vecX = vec3d.x - ((mc.player.isElytraFlying() && moreOptions.getValueByName("Перелетать противника").get()) ? mc.player.getPosX() : 0);
        double vecY = vec3d.y - ((mc.player.isElytraFlying() && moreOptions.getValueByName("Перелетать противника").get()) ? mc.player.getPosY() : 0);
        double vecZ = vec3d.z - ((mc.player.isElytraFlying() && moreOptions.getValueByName("Перелетать противника").get()) ? mc.player.getPosZ() : 0);
        float[] rotations = new float[]{(float)Math.toDegrees(Math.atan2(vecZ, vecX)) - 90.0F, (float)(-Math.toDegrees(Math.atan2(vecY, Math.hypot(vecX, vecZ))))};
        float deltaYaw = MathHelper.wrapDegrees(MathUtil.calculateDelta(rotations[0], rotateVector.x));
        float deltaPitch = MathUtil.calculateDelta(rotations[1], rotateVector.y);
        float limitedYaw = Math.min(Math.max(Math.abs(deltaYaw), 1.0F), 360);
        float limitedPitch = Math.min(Math.max(Math.abs(deltaPitch), 1.0F), 90);
        float finalYaw = rotateVector.x + (deltaYaw > 0.0F ? limitedYaw : -limitedYaw);
        float finalPitch = MathHelper.clamp(rotateVector.y + (deltaPitch > 0.0F ? limitedPitch : -limitedPitch), -90.0F, 90.0F);
        float gcd = SensUtils.getGCDValue();
        finalYaw = finalYaw - (finalYaw - rotateVector.x) % gcd;
        finalPitch = finalPitch - (finalPitch - rotateVector.y) % gcd;

        rotateVector = new Vector2f(finalYaw, finalPitch);

        if (options.getValueByName("Коррекция движения").get()) {
            mc.player.rotationYawOffset = finalYaw;
        }
    }

    private void baseRotation(float rotationYawSpeed, float rotationPitchSpeed) {
        Vector3d vec = target.getPositionVec().add(0, clamp(mc.player.getPosYEye() - target.getPosY(), 0, target.getHeight() * (mc.player.getDistanceEyePos(target) / attackDistance())), 0).subtract(mc.player.getEyePosition(1.0F));
        isRotated = true;

        float yawToTarget = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90);
        float pitchToTarget = (float) (-Math.toDegrees(Math.atan2(vec.y, hypot(vec.x, vec.z))));

        float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
        float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);

        int roundedYaw = (int) yawDelta;

        float clampedYaw1;
        float clampedPitch1;
        int roundYawDelta = (int) Math.abs(yawDelta);
        int roundPitchDelta = (int) Math.abs(pitchDelta);
        float yaw, pitch;
        float gcd;

        switch (type.get()) {
            case "Matrix" -> {
                float rotationSpeedX = 0.68F + (float) Math.random() * 0.25F;
                float rotationSpeedY = 0.6F + (float) Math.random() * 0.2F;
                yaw = rotateVector.x + yawDelta * rotationSpeedX;
                pitch = clamp(rotateVector.y + pitchDelta * rotationSpeedY, -89,89);
                gcd = SensUtils.getGCDValue();
                yaw -= (yaw - rotateVector.x) % gcd;
                pitch -= (pitch - rotateVector.y) % gcd;
                rotateVector = new Vector2f(yaw, pitch);
                if (options.getValueByName("Коррекция движения").get()) {
                    Minecraft.player.rotationYawOffset = yaw;
                }
                if (Math.random() > 0.6) {
                    yaw += (Math.random() - 0.5) * 0.2;
                    pitch += (Math.random() - 0.5) * 0.15;
                }
                float attackCooldown = 0.75F + (float) Math.random() * 0.1F;
                if (Minecraft.player.getCooledAttackStrength(0) > attackCooldown) {
                }
            }

            case "Плавная" -> {
                float rotationSpeedX = 0.38F + (float) Math.random() * 0.25F;
                float rotationSpeedY = 0.1F + (float) Math.random() * 0.2F;
                yaw = rotateVector.x + yawDelta * rotationSpeedX;
                pitch = clamp(rotateVector.y + pitchDelta * rotationSpeedY, -89,89);
                gcd = SensUtils.getGCDValue();
                yaw -= (yaw - rotateVector.x) % gcd;
                pitch -= (pitch - rotateVector.y) % gcd;
                rotateVector = new Vector2f(yaw, pitch);
                if (options.getValueByName("Коррекция движения").get()) {
                    Minecraft.player.rotationYawOffset = yaw;
                }
                if (Math.random() > 0.6) {
                    yaw += (Math.random() - 0.5) * 0.2;
                    pitch += (Math.random() - 0.5) * 0.15;
                }
                float attackCooldown = 0.75F + (float) Math.random() * 0.1F;
                if (Minecraft.player.getCooledAttackStrength(0) > attackCooldown) {
                }
            }
            case "Резкая" -> {
                yaw = rotateVector.x + yawDelta;
                pitch = clamp(rotateVector.y + pitchDelta, -90, 90);

                gcd = SensUtils.getGCDValue();
                yaw -= (yaw - rotateVector.x) % gcd;
                pitch -= (pitch - rotateVector.y) % gcd;

                rotateVector = new Vector2f(yaw, pitch);

                if (options.getValueByName("Коррекция движения").get()) {
                    mc.player.rotationYawOffset = yaw;
                }
            }
        }
    }

    public void critHelper() {
    }

    private void updateAttack() {
        selected = MouseUtil.getMouseOver(target, rotateVector.x, rotateVector.y, attackDistance());
        if ((mc.player.getDistanceEyePos(target)) > attackDistance()) {
            return;
        }

        if (moreOptions.getValueByName("Проверка луча").get() && !moreOptions.getValueByName("Перелетать противника").get() && !mc.player.isElytraFlying()) {
            if (selected == null) {
                return;
            }
        }

        if (mc.player.isBlocking() && options.getValueByName("Отжимать щит").get()) {
            mc.playerController.onStoppedUsingItem(mc.player);
        }

        if (!moreOptions.getValueByName("Бить через стены").get()) {
            if (!mc.player.canEntityBeSeen(target)) {
                return;
            }
        } else {
            if (wallBypass.get() && !mc.player.canEntityBeSeen(target)) {
                target.getPosition().add(MathUtil.random(-0.15F, 0.15F), target.getBoundingBox().getYSize(), MathUtil.random(-0.15F, 0.15F));
            }
        }

        if (moreOptions.getValueByName("Не бить если кушаешь").get()) {
            if (mc.player.isHandActive() && mc.player.getHeldItemOffhand().getUseAction() == UseAction.EAT) {
                return;
            }
        }

        if (moreOptions.getValueByName("Не бить если в гуи").get()) {
            if (mc.currentScreen != null && !(mc.currentScreen instanceof ClickGuiScreen || mc.currentScreen instanceof ChatScreen || mc.currentScreen instanceof IngameMenuScreen))
                return;
        }

        tpAuraRule = true;

        if (options.getValueByName("Ускорять ротацию при атаке").get()) {
            setRotate(70, 45);
        }

        stopWatch.setLastMS(500);
        Criticals.cancelCrit = true;
        if (Expensive.getInstance().getModuleManager().getCriticals().isState()) Expensive.getInstance().getModuleManager().getCriticals().sendCrit();
        mc.playerController.attackEntity(mc.player, target);
        mc.player.swingArm(Hand.MAIN_HAND);
        Criticals.cancelCrit = false;
        if (bypassFT.get()) {
            randomAttack(target);
        }
        if (target instanceof PlayerEntity player && options.getValueByName("Ломать щит").get()) {
            breakShieldPlayer(player);
        }
    }

    private void randomAttack(LivingEntity target){
        final KeyBinding[] pressedKeys = {mc.gameSettings.keyBindLeft, mc.gameSettings.keyBindRight};
        Vector3d vec = target.getPositionVec().add(0, clamp(mc.player.getPosYEye() - target.getPosY(),
                        0, target.getHeight() * (mc.player.getDistanceEyePos(target) / attackRange.get())), 0)
                .subtract(mc.player.getEyePosition(1.0F));
        float yawToTarget = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90);
        float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
        float yaw;
        float rotationSpeedX = 56;
        yaw = rotateVector.x + yawDelta * rotationSpeedX;

        float random = MathUtil.random(Math.min(1,2), Math.max(3, 4));
        float randomYaw = MathUtil.random(Math.min(1,2), Math.max(3, 4));
        float randomCrit = MathUtil.random(3,5);
        if (random == 1 || random == 2) {
            mc.player.setSprinting(false);
            mc.playerController.attackEntity(mc.player, target);
            mc.player.swingArm(Hand.MAIN_HAND);
            System.out.println("Attack");

        }
//        for (KeyBinding keyBinding : pressedKeys) {
//            if(randomYaw == 1) {
//                System.out.println("Rotation");
//                if (keyBinding.pressed) {
//                    mc.player.rotationYawHead = yaw + 9;
//                }
//            } if (randomYaw <= 1 ){
//                System.out.println("noRotation");
//            }
//       }

        if (random == 3 ) {
            System.out.println("noAttack");
        }
    }

    public boolean shouldPlayerFalling() {
        return AttackUtil.isPlayerFalling(options.getValueByName("Только криты").get() && !(Expensive.getInstance().getModuleManager().getCriticals().isState()), smartCrits.get(), options.getValueByName("Синхронизировать с TPS").get());
    }

    private boolean isValid(LivingEntity entity) {
        if (entity instanceof ClientPlayerEntity) return false;

        if (entity.ticksExisted < 3) return false;
        if ((mc.player.getDistanceEyePos(entity)) > maxRange()) return false;

        if (entity instanceof PlayerEntity p) {
            if (AntiBot.isBot(entity)) {
                return false;
            }
            if (!targets.getValueByName("Друзья").get() && FriendStorage.isFriend(p.getName().getString())) {
                return false;
            }

            if (p.getName().getString().equalsIgnoreCase(mc.player.getName().getString())) return false;
        }

        if (entity instanceof PlayerEntity && !targets.getValueByName("Игроки").get()) {
            return false;
        }
        if (entity instanceof PlayerEntity && entity.getTotalArmorValue() == 0 && !targets.getValueByName("Голые").get()) {
            return false;
        }
        if (entity instanceof PlayerEntity && entity.isInvisible() && entity.getTotalArmorValue() == 0 && !targets.getValueByName("Голые невидимки").get()) {
            return false;
        }

        if (entity instanceof PlayerEntity && entity.isInvisible() && !targets.getValueByName("Невидимки").get()) {
            return false;
        }

        if (entity instanceof PlayerEntity && ((PlayerEntity) entity).isCreative()) {
            return false;
        }

        if ((entity instanceof MonsterEntity || entity instanceof SlimeEntity || entity instanceof VillagerEntity) && !targets.getValueByName("Мобы").get()) {
            return false;
        }
        if (entity instanceof AnimalEntity && !targets.getValueByName("Животные").get()) {
            return false;
        }

        return !entity.isInvulnerable() && entity.isAlive() && !(entity instanceof ArmorStandEntity);
    }

    private void breakShieldPlayer(PlayerEntity entity) {
        if (entity.isBlocking()) {
            int invSlot = InventoryUtil.getInstance().getAxeInInventory(false);
            int hotBarSlot = InventoryUtil.getInstance().getAxeInInventory(true);

            if (hotBarSlot == -1 && invSlot != -1) {
                int bestSlot = InventoryUtil.getInstance().findBestSlotInHotBar();
                mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, mc.player);
                mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, mc.player);

                mc.player.connection.sendPacket(new CHeldItemChangePacket(bestSlot));
                mc.playerController.attackEntity(mc.player, entity);
                mc.player.swingArm(Hand.MAIN_HAND);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem));

                mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, mc.player);
                mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, mc.player);
            }

            if (hotBarSlot != -1) {
                mc.player.connection.sendPacket(new CHeldItemChangePacket(hotBarSlot));
                mc.playerController.attackEntity(mc.player, entity);
                mc.player.swingArm(Hand.MAIN_HAND);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem));
            }
        }
    }


    private void reset() {
        if (options.getValueByName("Коррекция движения").get()) {
            mc.player.rotationYawOffset = Integer.MIN_VALUE;
        }
        rotateVector = new Vector2f(mc.player.rotationYaw, mc.player.rotationPitch);
    }

    @Override
    public boolean onEnable() {
        super.onEnable();
        reset();
        target = null;
        return false;
    }

    @Override
    public void onDisable() {
        super.onDisable();
        reset();
        stopWatch.setLastMS(0);
        target = null;
        mc.timer.timerSpeed = 1;
    }
}

Код сделан щас за 5 минут правда скажу что слил ещё в сурсах но там была паста vortex(noad) и всё был в var поетому чтобыгласам было удобней смотреть на это вот сделал так за сам обход не бейте он ещё вроде работет
/del в чем прикол сливать если ее банит?
 
Сверху Снизу