Исходник Recookie Recode киллаура | Excellent

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

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

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

Спасибо!

Хорошая килаура для Excellent
Писал сам

(Не говно)


killaura:
package dev.excellent.client.module.impl.combat;

import dev.excellent.api.event.impl.player.MotionEvent;
import dev.excellent.api.event.impl.player.UpdateEvent;
import dev.excellent.api.interfaces.event.Listener;
import dev.excellent.client.module.api.Category;
import dev.excellent.client.module.api.Module;
import dev.excellent.client.module.api.ModuleInfo;
import dev.excellent.client.rotation.Rotation;
import dev.excellent.client.rotation.RotationHandler;
import dev.excellent.client.target.TargetHandler;
import dev.excellent.impl.util.pattern.Singleton;
import dev.excellent.impl.util.player.RayTraceUtil;
import dev.excellent.impl.util.rotation.AuraUtil;
import dev.excellent.impl.util.time.TimerUtil;
import dev.excellent.impl.value.impl.BooleanValue;
import dev.excellent.impl.value.impl.ModeValue;
import dev.excellent.impl.value.impl.MultiBooleanValue;
import dev.excellent.impl.value.impl.NumberValue;
import dev.excellent.impl.value.mode.SubMode;
import lombok.Getter;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.AxeItem;
import net.minecraft.item.ItemStack;
import net.minecraft.item.SwordItem;
import net.minecraft.item.ShieldItem;
import net.minecraft.item.Item;
import net.minecraft.network.play.client.CEntityActionPacket;
import net.minecraft.potion.Effects;
import net.minecraft.tags.FluidTags;
import net.minecraft.util.Hand;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceContext;

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

[USER=270918]@Getter[/USER]
@ModuleInfo(name = "AttackAura", description = "Осуществляет автоматические удары по заданным существам.", category = Category.COMBAT)
public class KillAura extends Module {
    public static Singleton<KillAura> singleton = Singleton.create(() -> Module.link(KillAura.class));
    private final NumberValue attackRange = new NumberValue("Дистанция", this, 3.5, 3, 7, 0.1f);
    private final NumberValue switchDelay = new NumberValue("Задержка смены", this, 300, 0, 2000, 10f);
    private final ModeValue modeValue = new ModeValue("Режим", this).add(SubMode.of("Обычная", "ХВХ", "Мульти", "Легитная"));
    private final ModeValue sortMode = new ModeValue("Сортировка по", this)
            .add(SubMode.of("Всему", "Здоровью", "Дистанции", "Время жизни"));
    private final ModeValue targetEspMode = new ModeValue("Режим есп", this)
            .add(SubMode.of("Новый", "Старый", "Кругляшок"));
    private final ModeValue bypassMode = new ModeValue("Обход", this)
            .add(SubMode.of("Funtime", "Holyworld", "Reallyworld", "Default"));

    private final MultiBooleanValue checks = new MultiBooleanValue("Настройки", this)
            .add(
                    new BooleanValue("Только криты", true),
                    new BooleanValue("Умные криты", true),
                    new BooleanValue("Ломать щит", true),
                    new BooleanValue("Таргет есп", true),
                    new BooleanValue("Сбрасывать спринт", true),
                    new BooleanValue("Авто-блок", false)
            );

    private final MultiBooleanValue targets = new MultiBooleanValue("Таргеты", this)
            .add(
                    new BooleanValue("Игроки", true),
                    new BooleanValue("Голые", true),
                    new BooleanValue("Невидимые", true),
                    new BooleanValue("Мобы", false)
            );

    private final NumberValue angleRange = new NumberValue("Размах наводки", this, 10, 1, 180, 1f);
    private final NumberValue aimSmooth = new NumberValue("Плавность наводки", this, 3, 1, 10, 1f);
    private final BooleanValue silentAim = new BooleanValue("Слепая наводка", true);
    private final BooleanValue randomDelay = new BooleanValue("Рандомная задержка", true);
    private final BooleanValue clientLook = new BooleanValue("Client-Look", false);
    private final BooleanValue predictiveAim = new BooleanValue("Предиктивная наводка", false);
    private final BooleanValue autoWeapon = new BooleanValue("Авто-оружие", false);
    private final BooleanValue wallCheck = new BooleanValue("Проверка стены", false);
    private final NumberValue fovCheck = new NumberValue("FOV", this, 90, 1, 180, 1f);

    public LivingEntity target;
    private final TimerUtil timer = TimerUtil.create();
    private final TimerUtil switchTimer = TimerUtil.create();
    private double prevPosY;
    private boolean canCritical;
    private int oldSlot = -1;
    private List<LivingEntity> targetList = new ArrayList<>();
    private final TimerUtil smartTimer = TimerUtil.create();

    [USER=1367676]@override[/USER]
    public void toggle() {
        super.toggle();
        target = null;
    }

    [USER=1367676]@override[/USER]
    public void onEnable() {
        super.onEnable();
        smartTimer.reset();
    }

    [USER=1367676]@override[/USER]
    public void onDisable() {
        super.onDisable();
        smartTimer.reset();
    }

    private final Listener<UpdateEvent> onUpdate = event -> {
        if (modeValue.is("Мульти")) {
            if (switchTimer.hasReached(switchDelay.getValue().longValue())) {
                targetList = findTargets();
                switchTimer.reset();
            }
            targetList.forEach(this::tryAttack);
        } else {
            target = TargetHandler.getTarget(attackRange.getValue().floatValue());
            if (target != null) {
                if (modeValue.is("Обычная")) {
                    updateRotation(target);
                }
                tryAttack(target);
            }
        }
    };

    private final Listener<MotionEvent> onMotion = event -> {
        double posY = event.getY();
        canCritical = !event.isOnGround() && posY < prevPosY;
        prevPosY = posY;
        if (modeValue.is("ХВХ")) {
            if (target == null) {
                return;
            }
            HvHRotation(event, target);
        }
    };

    private List<LivingEntity> findTargets() {
        List<LivingEntity> found = new ArrayList<>();
        float range = attackRange.getValue().floatValue();
        for (Entity e : mc.world.getAllEntities()) {
            if (e instanceof LivingEntity) {
                LivingEntity le = (LivingEntity) e;
                if (mc.player != le && le.isAlive() && mc.player.getDistance(le) <= range) {
                    found.add(le);
                }
            }
        }
        found.sort(getComparator());
        return found;
    }

    private Comparator<LivingEntity> getComparator() {
        if (sortMode.is("Дистанции")) {
            return Comparator.comparingDouble(e -> e.getDistance(mc.player));
        }
        if (sortMode.is("Здоровью")) {
            return Comparator
                    .comparingDouble((LivingEntity e) -> e.getHealth())
                    .thenComparingInt(e -> e.getTotalArmorValue());
        }
        if (sortMode.is("Время жизни")) {
            return Comparator.comparingInt(e -> e.ticksExisted);
        }
        return (a, b) -> Float.compare(enhancedThreatLevel(b), enhancedThreatLevel(a));
    }

    private float enhancedThreatLevel(LivingEntity ent) {
        float dist = (float) mc.player.getDistance(ent);
        float hp = ent.getHealth();
        int armor = ent.getTotalArmorValue();
        float baseThreat = (Math.max(0.1f, 10 - dist)) * (hp / 20f + armor / 20f);

        if (isFullyArmed(ent)) {
            baseThreat *= 1.25f;
        }

        return baseThreat;
    }

    private boolean isFullyArmed(LivingEntity ent) {
        ItemStack mainHand = ent.getHeldItemMainhand();
        if (mainHand == null || mainHand.isEmpty()) return false;
        Item item = mainHand.getItem();
        return (item instanceof SwordItem) || (item instanceof AxeItem);
    }

    private void tryAttack(LivingEntity ent) {
        if (!isValid(ent)) {
            return;
        }
        if (!isInFOV(ent, fovCheck.getValue().floatValue())) {
            return;
        }
        if (autoWeapon.getValue()) {
            swapBestWeapon();
        }
        if (isTooClose(ent)) {
            return;
        }
        if (modeValue.is("Обычная")) {
            updateRotation(ent);
        }
        updateAttack(ent);
    }

    private boolean isValid(LivingEntity ent) {
        return ent != null && ent.isAlive() && (mc.player.getDistance(ent) <= attackRange.getValue().floatValue()) && (!wallCheck.getValue() || !isBehindWall(ent));
    }

    private boolean isTooClose(LivingEntity ent) {
        return mc.player.getDistance(ent) < 1.0F;
    }

    private boolean isBehindWall(LivingEntity ent) {
        float partialTicks = mc.getRenderPartialTicks();
        Vector3d start = mc.player.getEyePosition(partialTicks);
        Vector3d end = ent.getPositionVec().add(0, ent.getEyeHeight(), 0);

        RayTraceContext context = new RayTraceContext(
            start,
            end,
            RayTraceContext.BlockMode.OUTLINE,
            RayTraceContext.FluidMode.NONE,
            mc.player
        );

        BlockRayTraceResult result = mc.world.rayTraceBlocks(context);
        return (result != null && result.getType() == RayTraceResult.Type.BLOCK);
    }

    private boolean isInFOV(LivingEntity ent, float fov) {
        Vector3d lookVec = mc.player.getLookVec().normalize();
        Vector3d targetVec = ent.getPositionVec().subtract(mc.player.getPositionVec()).normalize();
        double dot = lookVec.dotProduct(targetVec);
        double angle = Math.toDegrees(Math.acos(dot));
        return angle <= fov;
    }

    private void updateRotation(LivingEntity ent) {
        Vector3d motionPred = ent.getMotion().scale(0.5);
        Vector3d predictedPos = ent.getPositionVec().add(motionPred);

        Vector3d aimPos = (predictiveAim.getValue() ? predictedPos : ent.getPositionVec())
                .add(
                    0,
                    MathHelper.clamp(
                        mc.player.getEyePosition(1.0f).y - ent.getPosY(),
                        0,
                        ent.getHeight() * (AuraUtil.getStrictDistance(ent) / Math.max(mc.playerController.extendedReach() ? 6 : 3, attackRange.getValue().floatValue()))
                    ),
                    0
                )
                .subtract(mc.player.getEyePosition(1.0f)).normalize();

        float rawYaw = (float) Math.toDegrees(Math.atan2(-aimPos.x, aimPos.z));
        float rawPitch = (float) MathHelper.clamp(Math.toDegrees(Math.asin(-aimPos.y)), -90, 90);
        float yawDelta = (int) MathHelper.wrapDegrees(rawYaw - mc.player.rotationYaw);
        float pitchDelta = rawPitch - mc.player.rotationPitch;

        float yawSpeed;
        float pitchSpeed;

        if (modeValue.is("Легит")) {
            yawSpeed = 40;
            pitchSpeed = 2;
            yawSpeed *= 0.5f;
            pitchSpeed *= 0.5f;
            yawDelta += (float) (Math.random() * 2 - 1);
            pitchDelta += (float) (Math.random() * 1 - 0.5);
        } else {
            yawSpeed = 40;
            pitchSpeed = 2;
        }

        float clampedYaw = MathHelper.clamp(yawDelta, -yawSpeed, yawSpeed);
        float clampedPitch = MathHelper.clamp(pitchDelta, -pitchSpeed, pitchSpeed);
        float angle = angleRange.getValue().floatValue();
        float smooth = aimSmooth.getValue().floatValue();
        float yawModifier = (float) (Math.random() * (angle * 2f) - angle);
        float pitchModifier = (float) (Math.random() * (angle / 2f) - (angle / 4f));
        clampedYaw  += yawModifier / smooth;
        clampedPitch += pitchModifier / smooth;
        if (!clientLook.getValue()) {
            RotationHandler.update(
                    new Rotation(
                            mc.player.rotationYaw + clampedYaw,
                            mc.player.rotationPitch + (mc.objectMouseOver != null && mc.objectMouseOver.getType() == RayTraceResult.Type.ENTITY ? 0 : clampedPitch)
                    ),
                    360,
                    1,
                    5
            );
        } else {
            mc.player.rotationYaw += clampedYaw;
            mc.player.rotationPitch += clampedPitch;
        }
    }

    private void HvHRotation(MotionEvent e, LivingEntity ent) {
        Vector3d vec = ent.getPositionVec().add(0, MathHelper.clamp(mc.player.getEyePosition(1.0f).y - ent.getPosY(),
                0, ent.getHeight() * (AuraUtil.getStrictDistance((ent)) / Math.max(mc.playerController.extendedReach() ? 6 : 3, attackRange.getValue().floatValue()))), 0)
                .subtract(mc.player.getEyePosition(1.0f)).normalize();
        float rawYaw = (float) Math.toDegrees(Math.atan2(-vec.x, vec.z));
        float rawPitch = (float) MathHelper.clamp(Math.toDegrees(Math.asin(-vec.y)), -89, 89);
        float yawDelta = (int) MathHelper.wrapDegrees(rawYaw - mc.player.rotationYaw);
        float pitchDelta = rawPitch - mc.player.rotationPitch;
        float yawSpeed;
        float pitchSpeed;
        if (bypassMode.is("Funtime")) {
            yawSpeed = 100;
            pitchSpeed = 40;
        } else if (bypassMode.is("Holyworld")) {
            yawSpeed = 110;
            pitchSpeed = 45;
        } else if (bypassMode.is("Reallyworld")) {
            yawSpeed = 125;
            pitchSpeed = 50;
        } else {
            yawSpeed = 125;
            pitchSpeed = 50;
        }
        float clampedYaw = MathHelper.clamp(yawDelta, -yawSpeed, yawSpeed);
        float clampedPitch = MathHelper.clamp(pitchDelta, -pitchSpeed, pitchSpeed);
        float angle = angleRange.getValue().floatValue();
        float smooth = aimSmooth.getValue().floatValue();
        float yawModifier = (float) (Math.random() * (angle * 2f) - angle);
        float pitchModifier = (float) (Math.random() * (angle / 2f) - (angle / 4f));
        clampedYaw  += yawModifier / smooth;
        clampedPitch += pitchModifier / smooth;
        if (!clientLook.getValue()) {
            RotationHandler.update(
                    new Rotation(
                            mc.player.rotationYaw + clampedYaw,
                            mc.player.rotationPitch + (mc.objectMouseOver != null && mc.objectMouseOver.getType() == RayTraceResult.Type.ENTITY ? 0 : clampedPitch)
                    ),
                    360,
                    1,
                    5
            );
        } else {
            mc.player.rotationYaw += clampedYaw;
            mc.player.rotationPitch += clampedPitch;
        }
    }

    [USER=1367676]@override[/USER]
    public String getSuffix() {
        return modeValue.getValue().getName();
    }

    private void updateAttack(LivingEntity ent) {
        int currSlot = mc.player.inventory.currentItem;
        int axeSlot = getAxeSlot(ent);
        boolean shouldBreak = axeSlot != -1;
        if (checks.isEnabled("Авто-блок")) {
            autoBlock(true);
        }
        if (shouldBreak) {
            if (currSlot != axeSlot) {
                mc.player.inventory.currentItem = axeSlot;
                mc.playerController.syncCurrentPlayItem();
                oldSlot = currSlot;
            }
        } else if (oldSlot != -1) {
            mc.player.inventory.currentItem = oldSlot;
            mc.playerController.syncCurrentPlayItem();
            oldSlot = -1;
        }
        if (shouldAttack() || shouldBreak) {
            if ((!modeValue.is("Обычная") || RayTraceUtil.rayTraceSingleEntity(mc.player.rotationYaw, mc.player.rotationPitch,
                    Math.max(mc.playerController.extendedReach() ? 6 : 3, attackRange.getValue().floatValue()), ent))) {
                if (mc.player.isActiveItemStackBlocking()) {
                    mc.playerController.onStoppedUsingItem(mc.player);
                }
                boolean sprinting = checks.isEnabled("Сбрасывать спринт") && mc.player.serverSprintState;
                if (sprinting) {
                    mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.STOP_SPRINTING));
                }
                attackEntity(ent);
                if (sprinting) {
                    mc.player.setSprinting(true);
                    mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.START_SPRINTING));
                }
            }
        }
        if (checks.isEnabled("Авто-блок")) {
            autoBlock(false);
        }
    }

    private void autoBlock(boolean start) {
        int shieldSlot = getShieldSlot();
        if (shieldSlot != -1) {
            if (start) {
                if (!mc.player.isActiveItemStackBlocking()) {
                    mc.player.inventory.currentItem = shieldSlot;
                    mc.playerController.syncCurrentPlayItem();
                    mc.playerController.processRightClick(mc.player, mc.world, Hand.OFF_HAND);
                }
            } else {
                if (mc.player.isActiveItemStackBlocking()) {
                    mc.playerController.onStoppedUsingItem(mc.player);
                }
            }
        }
    }

    private int getShieldSlot() {
        for (int i = 0; i < 9; i++) {
            if (mc.player.inventory.mainInventory.get(i).getItem() instanceof ShieldItem) {
                return i;
            }
        }
        return -1;
    }

    private void attackEntity(Entity entity) {
        mc.playerController.attackEntity(mc.player, entity);
        mc.player.swingArm(Hand.MAIN_HAND);
        timer.reset();
    }

    public boolean shouldAttack() {
        boolean isReady = timer.hasReached(250) && mc.player.getCooledAttackStrength(1.5F) >= 1F;
        int nearby = targetList != null ? targetList.size() : 1;
        long adjustedDelay = Math.max(250, 400 - (nearby * 10));
        if (!smartTimer.hasReached(adjustedDelay)) {
            return false;
        }
        boolean isInAirStrict = mc.player.movementInput.jump || !mc.player.isOnGround();
        boolean canAttack = isReady && !((checks.isEnabled("Только криты") && shouldCritical())
                && !(checks.isEnabled("Умные криты") && !isInAirStrict) && !canCritical);
        if (canAttack) {
            smartTimer.reset();
        }
        return canAttack;
    }

    private int getAxeSlot(LivingEntity ent) {
        if (!ent.isActiveItemStackBlocking() || !checks.isEnabled("Ломать щит")) {
            return -1;
        }
        if (Math.abs(MathHelper.wrapDegrees(mc.player.rotationYaw - ent.rotationYaw - 180)) > 90) {
            return -1;
        }
        for (int i = 0; i < 9; i++) {
            if (mc.player.inventory.mainInventory.get(i).getItem() instanceof AxeItem) {
                return i;
            }
        }
        return -1;
    }

    private boolean shouldCritical() {
        boolean isDeBuffed = mc.player.isPotionActive(Effects.LEVITATION)
                || mc.player.isPotionActive(Effects.BLINDNESS)
                || mc.player.isPotionActive(Effects.SLOW_FALLING);
        boolean isInLiquid = mc.player.areEyesInFluid(FluidTags.WATER) || mc.player.areEyesInFluid(FluidTags.LAVA);
        boolean isFlying = mc.player.abilities.isFlying || mc.player.isElytraFlying();
        boolean isClimbing = mc.player.isOnLadder();
        boolean isCantJump = mc.player.isPassenger();
        return !(isDeBuffed || isInLiquid || isFlying || isClimbing || isCantJump);
    }

    private void swapBestWeapon() {
        int bestSlot = mc.player.inventory.currentItem;
        float bestDamage = getWeaponDamage(mc.player.inventory.getStackInSlot(bestSlot));
        for (int i = 0; i < 9; i++) {
            float dmg = getWeaponDamage(mc.player.inventory.getStackInSlot(i));
            if (dmg > bestDamage) {
                bestDamage = dmg;
                bestSlot = i;
            }
        }
        if (bestSlot != mc.player.inventory.currentItem) {
            mc.player.inventory.currentItem = bestSlot;
            mc.playerController.syncCurrentPlayItem();
        }
    }

    private float getWeaponDamage(ItemStack stack) {
        if (stack.isEmpty()) return 0;
        float baseDamage = 0;
        if (stack.getItem() instanceof SwordItem) {
            baseDamage = ((SwordItem)stack.getItem()).getAttackDamage();
        } else if (stack.getItem() instanceof AxeItem) {
            baseDamage = (float)((AxeItem)stack.getItem()).getAttackDamage() - 1.0F;
        }
        return baseDamage;
    }
}
 
Начинающий
Статус
Оффлайн
Регистрация
8 Апр 2024
Сообщения
14
Реакции[?]
0
Поинты[?]
0
Хорошая килаура для Excellent
Писал сам

(Не говно)


killaura:
package dev.excellent.client.module.impl.combat;

import dev.excellent.api.event.impl.player.MotionEvent;
import dev.excellent.api.event.impl.player.UpdateEvent;
import dev.excellent.api.interfaces.event.Listener;
import dev.excellent.client.module.api.Category;
import dev.excellent.client.module.api.Module;
import dev.excellent.client.module.api.ModuleInfo;
import dev.excellent.client.rotation.Rotation;
import dev.excellent.client.rotation.RotationHandler;
import dev.excellent.client.target.TargetHandler;
import dev.excellent.impl.util.pattern.Singleton;
import dev.excellent.impl.util.player.RayTraceUtil;
import dev.excellent.impl.util.rotation.AuraUtil;
import dev.excellent.impl.util.time.TimerUtil;
import dev.excellent.impl.value.impl.BooleanValue;
import dev.excellent.impl.value.impl.ModeValue;
import dev.excellent.impl.value.impl.MultiBooleanValue;
import dev.excellent.impl.value.impl.NumberValue;
import dev.excellent.impl.value.mode.SubMode;
import lombok.Getter;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.AxeItem;
import net.minecraft.item.ItemStack;
import net.minecraft.item.SwordItem;
import net.minecraft.item.ShieldItem;
import net.minecraft.item.Item;
import net.minecraft.network.play.client.CEntityActionPacket;
import net.minecraft.potion.Effects;
import net.minecraft.tags.FluidTags;
import net.minecraft.util.Hand;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceContext;

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

[USER=270918]@Getter[/USER]
@ModuleInfo(name = "AttackAura", description = "Осуществляет автоматические удары по заданным существам.", category = Category.COMBAT)
public class KillAura extends Module {
    public static Singleton<KillAura> singleton = Singleton.create(() -> Module.link(KillAura.class));
    private final NumberValue attackRange = new NumberValue("Дистанция", this, 3.5, 3, 7, 0.1f);
    private final NumberValue switchDelay = new NumberValue("Задержка смены", this, 300, 0, 2000, 10f);
    private final ModeValue modeValue = new ModeValue("Режим", this).add(SubMode.of("Обычная", "ХВХ", "Мульти", "Легитная"));
    private final ModeValue sortMode = new ModeValue("Сортировка по", this)
            .add(SubMode.of("Всему", "Здоровью", "Дистанции", "Время жизни"));
    private final ModeValue targetEspMode = new ModeValue("Режим есп", this)
            .add(SubMode.of("Новый", "Старый", "Кругляшок"));
    private final ModeValue bypassMode = new ModeValue("Обход", this)
            .add(SubMode.of("Funtime", "Holyworld", "Reallyworld", "Default"));

    private final MultiBooleanValue checks = new MultiBooleanValue("Настройки", this)
            .add(
                    new BooleanValue("Только криты", true),
                    new BooleanValue("Умные криты", true),
                    new BooleanValue("Ломать щит", true),
                    new BooleanValue("Таргет есп", true),
                    new BooleanValue("Сбрасывать спринт", true),
                    new BooleanValue("Авто-блок", false)
            );

    private final MultiBooleanValue targets = new MultiBooleanValue("Таргеты", this)
            .add(
                    new BooleanValue("Игроки", true),
                    new BooleanValue("Голые", true),
                    new BooleanValue("Невидимые", true),
                    new BooleanValue("Мобы", false)
            );

    private final NumberValue angleRange = new NumberValue("Размах наводки", this, 10, 1, 180, 1f);
    private final NumberValue aimSmooth = new NumberValue("Плавность наводки", this, 3, 1, 10, 1f);
    private final BooleanValue silentAim = new BooleanValue("Слепая наводка", true);
    private final BooleanValue randomDelay = new BooleanValue("Рандомная задержка", true);
    private final BooleanValue clientLook = new BooleanValue("Client-Look", false);
    private final BooleanValue predictiveAim = new BooleanValue("Предиктивная наводка", false);
    private final BooleanValue autoWeapon = new BooleanValue("Авто-оружие", false);
    private final BooleanValue wallCheck = new BooleanValue("Проверка стены", false);
    private final NumberValue fovCheck = new NumberValue("FOV", this, 90, 1, 180, 1f);

    public LivingEntity target;
    private final TimerUtil timer = TimerUtil.create();
    private final TimerUtil switchTimer = TimerUtil.create();
    private double prevPosY;
    private boolean canCritical;
    private int oldSlot = -1;
    private List<LivingEntity> targetList = new ArrayList<>();
    private final TimerUtil smartTimer = TimerUtil.create();

    [USER=1367676]@override[/USER]
    public void toggle() {
        super.toggle();
        target = null;
    }

    [USER=1367676]@override[/USER]
    public void onEnable() {
        super.onEnable();
        smartTimer.reset();
    }

    [USER=1367676]@override[/USER]
    public void onDisable() {
        super.onDisable();
        smartTimer.reset();
    }

    private final Listener<UpdateEvent> onUpdate = event -> {
        if (modeValue.is("Мульти")) {
            if (switchTimer.hasReached(switchDelay.getValue().longValue())) {
                targetList = findTargets();
                switchTimer.reset();
            }
            targetList.forEach(this::tryAttack);
        } else {
            target = TargetHandler.getTarget(attackRange.getValue().floatValue());
            if (target != null) {
                if (modeValue.is("Обычная")) {
                    updateRotation(target);
                }
                tryAttack(target);
            }
        }
    };

    private final Listener<MotionEvent> onMotion = event -> {
        double posY = event.getY();
        canCritical = !event.isOnGround() && posY < prevPosY;
        prevPosY = posY;
        if (modeValue.is("ХВХ")) {
            if (target == null) {
                return;
            }
            HvHRotation(event, target);
        }
    };

    private List<LivingEntity> findTargets() {
        List<LivingEntity> found = new ArrayList<>();
        float range = attackRange.getValue().floatValue();
        for (Entity e : mc.world.getAllEntities()) {
            if (e instanceof LivingEntity) {
                LivingEntity le = (LivingEntity) e;
                if (mc.player != le && le.isAlive() && mc.player.getDistance(le) <= range) {
                    found.add(le);
                }
            }
        }
        found.sort(getComparator());
        return found;
    }

    private Comparator<LivingEntity> getComparator() {
        if (sortMode.is("Дистанции")) {
            return Comparator.comparingDouble(e -> e.getDistance(mc.player));
        }
        if (sortMode.is("Здоровью")) {
            return Comparator
                    .comparingDouble((LivingEntity e) -> e.getHealth())
                    .thenComparingInt(e -> e.getTotalArmorValue());
        }
        if (sortMode.is("Время жизни")) {
            return Comparator.comparingInt(e -> e.ticksExisted);
        }
        return (a, b) -> Float.compare(enhancedThreatLevel(b), enhancedThreatLevel(a));
    }

    private float enhancedThreatLevel(LivingEntity ent) {
        float dist = (float) mc.player.getDistance(ent);
        float hp = ent.getHealth();
        int armor = ent.getTotalArmorValue();
        float baseThreat = (Math.max(0.1f, 10 - dist)) * (hp / 20f + armor / 20f);

        if (isFullyArmed(ent)) {
            baseThreat *= 1.25f;
        }

        return baseThreat;
    }

    private boolean isFullyArmed(LivingEntity ent) {
        ItemStack mainHand = ent.getHeldItemMainhand();
        if (mainHand == null || mainHand.isEmpty()) return false;
        Item item = mainHand.getItem();
        return (item instanceof SwordItem) || (item instanceof AxeItem);
    }

    private void tryAttack(LivingEntity ent) {
        if (!isValid(ent)) {
            return;
        }
        if (!isInFOV(ent, fovCheck.getValue().floatValue())) {
            return;
        }
        if (autoWeapon.getValue()) {
            swapBestWeapon();
        }
        if (isTooClose(ent)) {
            return;
        }
        if (modeValue.is("Обычная")) {
            updateRotation(ent);
        }
        updateAttack(ent);
    }

    private boolean isValid(LivingEntity ent) {
        return ent != null && ent.isAlive() && (mc.player.getDistance(ent) <= attackRange.getValue().floatValue()) && (!wallCheck.getValue() || !isBehindWall(ent));
    }

    private boolean isTooClose(LivingEntity ent) {
        return mc.player.getDistance(ent) < 1.0F;
    }

    private boolean isBehindWall(LivingEntity ent) {
        float partialTicks = mc.getRenderPartialTicks();
        Vector3d start = mc.player.getEyePosition(partialTicks);
        Vector3d end = ent.getPositionVec().add(0, ent.getEyeHeight(), 0);

        RayTraceContext context = new RayTraceContext(
            start,
            end,
            RayTraceContext.BlockMode.OUTLINE,
            RayTraceContext.FluidMode.NONE,
            mc.player
        );

        BlockRayTraceResult result = mc.world.rayTraceBlocks(context);
        return (result != null && result.getType() == RayTraceResult.Type.BLOCK);
    }

    private boolean isInFOV(LivingEntity ent, float fov) {
        Vector3d lookVec = mc.player.getLookVec().normalize();
        Vector3d targetVec = ent.getPositionVec().subtract(mc.player.getPositionVec()).normalize();
        double dot = lookVec.dotProduct(targetVec);
        double angle = Math.toDegrees(Math.acos(dot));
        return angle <= fov;
    }

    private void updateRotation(LivingEntity ent) {
        Vector3d motionPred = ent.getMotion().scale(0.5);
        Vector3d predictedPos = ent.getPositionVec().add(motionPred);

        Vector3d aimPos = (predictiveAim.getValue() ? predictedPos : ent.getPositionVec())
                .add(
                    0,
                    MathHelper.clamp(
                        mc.player.getEyePosition(1.0f).y - ent.getPosY(),
                        0,
                        ent.getHeight() * (AuraUtil.getStrictDistance(ent) / Math.max(mc.playerController.extendedReach() ? 6 : 3, attackRange.getValue().floatValue()))
                    ),
                    0
                )
                .subtract(mc.player.getEyePosition(1.0f)).normalize();

        float rawYaw = (float) Math.toDegrees(Math.atan2(-aimPos.x, aimPos.z));
        float rawPitch = (float) MathHelper.clamp(Math.toDegrees(Math.asin(-aimPos.y)), -90, 90);
        float yawDelta = (int) MathHelper.wrapDegrees(rawYaw - mc.player.rotationYaw);
        float pitchDelta = rawPitch - mc.player.rotationPitch;

        float yawSpeed;
        float pitchSpeed;

        if (modeValue.is("Легит")) {
            yawSpeed = 40;
            pitchSpeed = 2;
            yawSpeed *= 0.5f;
            pitchSpeed *= 0.5f;
            yawDelta += (float) (Math.random() * 2 - 1);
            pitchDelta += (float) (Math.random() * 1 - 0.5);
        } else {
            yawSpeed = 40;
            pitchSpeed = 2;
        }

        float clampedYaw = MathHelper.clamp(yawDelta, -yawSpeed, yawSpeed);
        float clampedPitch = MathHelper.clamp(pitchDelta, -pitchSpeed, pitchSpeed);
        float angle = angleRange.getValue().floatValue();
        float smooth = aimSmooth.getValue().floatValue();
        float yawModifier = (float) (Math.random() * (angle * 2f) - angle);
        float pitchModifier = (float) (Math.random() * (angle / 2f) - (angle / 4f));
        clampedYaw  += yawModifier / smooth;
        clampedPitch += pitchModifier / smooth;
        if (!clientLook.getValue()) {
            RotationHandler.update(
                    new Rotation(
                            mc.player.rotationYaw + clampedYaw,
                            mc.player.rotationPitch + (mc.objectMouseOver != null && mc.objectMouseOver.getType() == RayTraceResult.Type.ENTITY ? 0 : clampedPitch)
                    ),
                    360,
                    1,
                    5
            );
        } else {
            mc.player.rotationYaw += clampedYaw;
            mc.player.rotationPitch += clampedPitch;
        }
    }

    private void HvHRotation(MotionEvent e, LivingEntity ent) {
        Vector3d vec = ent.getPositionVec().add(0, MathHelper.clamp(mc.player.getEyePosition(1.0f).y - ent.getPosY(),
                0, ent.getHeight() * (AuraUtil.getStrictDistance((ent)) / Math.max(mc.playerController.extendedReach() ? 6 : 3, attackRange.getValue().floatValue()))), 0)
                .subtract(mc.player.getEyePosition(1.0f)).normalize();
        float rawYaw = (float) Math.toDegrees(Math.atan2(-vec.x, vec.z));
        float rawPitch = (float) MathHelper.clamp(Math.toDegrees(Math.asin(-vec.y)), -89, 89);
        float yawDelta = (int) MathHelper.wrapDegrees(rawYaw - mc.player.rotationYaw);
        float pitchDelta = rawPitch - mc.player.rotationPitch;
        float yawSpeed;
        float pitchSpeed;
        if (bypassMode.is("Funtime")) {
            yawSpeed = 100;
            pitchSpeed = 40;
        } else if (bypassMode.is("Holyworld")) {
            yawSpeed = 110;
            pitchSpeed = 45;
        } else if (bypassMode.is("Reallyworld")) {
            yawSpeed = 125;
            pitchSpeed = 50;
        } else {
            yawSpeed = 125;
            pitchSpeed = 50;
        }
        float clampedYaw = MathHelper.clamp(yawDelta, -yawSpeed, yawSpeed);
        float clampedPitch = MathHelper.clamp(pitchDelta, -pitchSpeed, pitchSpeed);
        float angle = angleRange.getValue().floatValue();
        float smooth = aimSmooth.getValue().floatValue();
        float yawModifier = (float) (Math.random() * (angle * 2f) - angle);
        float pitchModifier = (float) (Math.random() * (angle / 2f) - (angle / 4f));
        clampedYaw  += yawModifier / smooth;
        clampedPitch += pitchModifier / smooth;
        if (!clientLook.getValue()) {
            RotationHandler.update(
                    new Rotation(
                            mc.player.rotationYaw + clampedYaw,
                            mc.player.rotationPitch + (mc.objectMouseOver != null && mc.objectMouseOver.getType() == RayTraceResult.Type.ENTITY ? 0 : clampedPitch)
                    ),
                    360,
                    1,
                    5
            );
        } else {
            mc.player.rotationYaw += clampedYaw;
            mc.player.rotationPitch += clampedPitch;
        }
    }

    [USER=1367676]@override[/USER]
    public String getSuffix() {
        return modeValue.getValue().getName();
    }

    private void updateAttack(LivingEntity ent) {
        int currSlot = mc.player.inventory.currentItem;
        int axeSlot = getAxeSlot(ent);
        boolean shouldBreak = axeSlot != -1;
        if (checks.isEnabled("Авто-блок")) {
            autoBlock(true);
        }
        if (shouldBreak) {
            if (currSlot != axeSlot) {
                mc.player.inventory.currentItem = axeSlot;
                mc.playerController.syncCurrentPlayItem();
                oldSlot = currSlot;
            }
        } else if (oldSlot != -1) {
            mc.player.inventory.currentItem = oldSlot;
            mc.playerController.syncCurrentPlayItem();
            oldSlot = -1;
        }
        if (shouldAttack() || shouldBreak) {
            if ((!modeValue.is("Обычная") || RayTraceUtil.rayTraceSingleEntity(mc.player.rotationYaw, mc.player.rotationPitch,
                    Math.max(mc.playerController.extendedReach() ? 6 : 3, attackRange.getValue().floatValue()), ent))) {
                if (mc.player.isActiveItemStackBlocking()) {
                    mc.playerController.onStoppedUsingItem(mc.player);
                }
                boolean sprinting = checks.isEnabled("Сбрасывать спринт") && mc.player.serverSprintState;
                if (sprinting) {
                    mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.STOP_SPRINTING));
                }
                attackEntity(ent);
                if (sprinting) {
                    mc.player.setSprinting(true);
                    mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.START_SPRINTING));
                }
            }
        }
        if (checks.isEnabled("Авто-блок")) {
            autoBlock(false);
        }
    }

    private void autoBlock(boolean start) {
        int shieldSlot = getShieldSlot();
        if (shieldSlot != -1) {
            if (start) {
                if (!mc.player.isActiveItemStackBlocking()) {
                    mc.player.inventory.currentItem = shieldSlot;
                    mc.playerController.syncCurrentPlayItem();
                    mc.playerController.processRightClick(mc.player, mc.world, Hand.OFF_HAND);
                }
            } else {
                if (mc.player.isActiveItemStackBlocking()) {
                    mc.playerController.onStoppedUsingItem(mc.player);
                }
            }
        }
    }

    private int getShieldSlot() {
        for (int i = 0; i < 9; i++) {
            if (mc.player.inventory.mainInventory.get(i).getItem() instanceof ShieldItem) {
                return i;
            }
        }
        return -1;
    }

    private void attackEntity(Entity entity) {
        mc.playerController.attackEntity(mc.player, entity);
        mc.player.swingArm(Hand.MAIN_HAND);
        timer.reset();
    }

    public boolean shouldAttack() {
        boolean isReady = timer.hasReached(250) && mc.player.getCooledAttackStrength(1.5F) >= 1F;
        int nearby = targetList != null ? targetList.size() : 1;
        long adjustedDelay = Math.max(250, 400 - (nearby * 10));
        if (!smartTimer.hasReached(adjustedDelay)) {
            return false;
        }
        boolean isInAirStrict = mc.player.movementInput.jump || !mc.player.isOnGround();
        boolean canAttack = isReady && !((checks.isEnabled("Только криты") && shouldCritical())
                && !(checks.isEnabled("Умные криты") && !isInAirStrict) && !canCritical);
        if (canAttack) {
            smartTimer.reset();
        }
        return canAttack;
    }

    private int getAxeSlot(LivingEntity ent) {
        if (!ent.isActiveItemStackBlocking() || !checks.isEnabled("Ломать щит")) {
            return -1;
        }
        if (Math.abs(MathHelper.wrapDegrees(mc.player.rotationYaw - ent.rotationYaw - 180)) > 90) {
            return -1;
        }
        for (int i = 0; i < 9; i++) {
            if (mc.player.inventory.mainInventory.get(i).getItem() instanceof AxeItem) {
                return i;
            }
        }
        return -1;
    }

    private boolean shouldCritical() {
        boolean isDeBuffed = mc.player.isPotionActive(Effects.LEVITATION)
                || mc.player.isPotionActive(Effects.BLINDNESS)
                || mc.player.isPotionActive(Effects.SLOW_FALLING);
        boolean isInLiquid = mc.player.areEyesInFluid(FluidTags.WATER) || mc.player.areEyesInFluid(FluidTags.LAVA);
        boolean isFlying = mc.player.abilities.isFlying || mc.player.isElytraFlying();
        boolean isClimbing = mc.player.isOnLadder();
        boolean isCantJump = mc.player.isPassenger();
        return !(isDeBuffed || isInLiquid || isFlying || isClimbing || isCantJump);
    }

    private void swapBestWeapon() {
        int bestSlot = mc.player.inventory.currentItem;
        float bestDamage = getWeaponDamage(mc.player.inventory.getStackInSlot(bestSlot));
        for (int i = 0; i < 9; i++) {
            float dmg = getWeaponDamage(mc.player.inventory.getStackInSlot(i));
            if (dmg > bestDamage) {
                bestDamage = dmg;
                bestSlot = i;
            }
        }
        if (bestSlot != mc.player.inventory.currentItem) {
            mc.player.inventory.currentItem = bestSlot;
            mc.playerController.syncCurrentPlayItem();
        }
    }

    private float getWeaponDamage(ItemStack stack) {
        if (stack.isEmpty()) return 0;
        float baseDamage = 0;
        if (stack.getItem() instanceof SwordItem) {
            baseDamage = ((SwordItem)stack.getItem()).getAttackDamage();
        } else if (stack.getItem() instanceof AxeItem) {
            baseDamage = (float)((AxeItem)stack.getItem()).getAttackDamage() - 1.0F;
        }
        return baseDamage;
    }
}
вроде норм
 
Сверху Снизу