Подписывайтесь на наш Telegram и не пропускайте важные новости! Перейти

Исходник Killaura Titanium (exp pasta)

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
2 Дек 2025
Сообщения
117
Реакции
1
Выберите загрузчик игры
  1. Vanilla
  2. Прочие моды
Сливаю килку титаниум клиента (этот клиент кидал и кидает ратки)
Не советую использовать это чудище чата гпт, думаю что ничего не обходит
а так же у него есть похожие говно пасты клиенты под говно сервера
по коду чекнул, там дебуда 1 в 1
Java:
Expand Collapse Copy
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package dev.akven.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import dev.akven.command.friends.FriendStorage;
import dev.akven.events.EventInput;
import dev.akven.events.EventMotion;
import dev.akven.events.EventUpdate;
import dev.akven.functions.api.Category;
import dev.akven.functions.api.Function;
import dev.akven.functions.api.FunctionRegister;
import dev.akven.functions.settings.Setting;
import dev.akven.functions.settings.impl.BooleanSetting;
import dev.akven.functions.settings.impl.ModeListSetting;
import dev.akven.functions.settings.impl.ModeSetting;
import dev.akven.functions.settings.impl.SliderSetting;
import dev.akven.utils.math.SensUtils;
import dev.akven.utils.math.StopWatch;
import dev.akven.utils.player.MouseUtil;
import dev.akven.utils.player.MoveUtils;
import it.unimi.dsi.fastutil.objects.ObjectIterator;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.IngameMenuScreen;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.item.ArmorStandEntity;
import net.minecraft.entity.monster.MonsterEntity;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.UseAction;
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;

@FunctionRegister(
name = "Aura",
    type = Category.Combat
)
public class KillAura extends Function {
private final ModeSetting type = new ModeSetting("Режим ротации", "SpookyTime", new String[]{"SpookyTime", "FunTime", "ReallyWorld", "HolyWorld"});
private final SliderSetting attackRange = new SliderSetting("Дистанция аттаки", 3.0F, 2.5F, 12.0F, 0.05F);
private final SliderSetting elytraRange = new SliderSetting("Дистанция на элитре", 6.0F, 0.0F, 16.0F, 0.05F);
private final BooleanSetting predict = new BooleanSetting("Предикт", false);
private final SliderSetting predictStrength = (new SliderSetting("Сила предикта", 0.2F, 0.1F, 0.3F, 0.05F)).setVisible(() -> (Boolean)this.predict.get());
final ModeListSetting targets = new ModeListSetting("Таргеты", new BooleanSetting[]{new BooleanSetting("Игроки", true), new BooleanSetting("Голые", true), new BooleanSetting("Мобы", false), new BooleanSetting("Животные", false), new BooleanSetting("Голые невидимки", true), new BooleanSetting("Невидимки", true)});
final ModeListSetting consider = new ModeListSetting("Учитывать", new BooleanSetting[]{new BooleanSetting("Хп", true), new BooleanSetting("Броню", true), new BooleanSetting("Дистанцию", true), new BooleanSetting("Баффы", true)});
public static ModeListSetting options = new ModeListSetting("Опции", new BooleanSetting[]{new BooleanSetting("Только криты", true), new BooleanSetting("Синхронизировать с TPS", false), new BooleanSetting("Фокусировать одну цель", true), new BooleanSetting("Коррекция движения", true), new BooleanSetting("Оптимальная дистанция атаки", false), new BooleanSetting("Резольвер", false)});
final ModeListSetting moreOptions = new ModeListSetting("Триггеры", new BooleanSetting[]{new BooleanSetting("Проверка луча", true), new BooleanSetting("Бить через стены", true), new BooleanSetting("Не бить если кушаешь", true), new BooleanSetting("Не бить если в гуи", true)});
private final ModeSetting sprintMode = new ModeSetting("Режим спринта", "Легитный", new String[]{"Легитный", "Быстрый"});
private final BooleanSetting ignoreFriends = new BooleanSetting("Не бить друзей", true);
private final BooleanSetting wallBypass = (new BooleanSetting("Обход Через Стены", true)).setVisible(() -> (Boolean)this.moreOptions.getValueByName("Бить через стены").get());
private final ModeSetting critmode = new ModeSetting("Тип критов", "Только криты", new String[]{"Только криты", "Умные криты"});
private final ModeSetting correctionType = (new ModeSetting("Тип коррекции", "Свободный", new String[]{"Свободный", "Сфокусированный"})).setVisible(() -> (Boolean)options.getValueByName("Коррекция движения").get());
private final StopWatch stopWatch = new StopWatch();
public static Vector2f rotateVector = new Vector2f(0.0F, 0.0F);
 public static LivingEntity target;
private boolean sprintReset = false;
 private Entity selected;
int ticks = 0;
int inputTick = 0;
boolean isRotated = false;
boolean canWork = true;
boolean tpAuraRule = false;
 final AutoPotion autoPotion;
 float lastYaw;
 float lastPitch;

 public KillAura(AutoPotion autoPotion) {
this.addSettings(new Setting[]{this.type, this.attackRange, this.elytraRange, this.targets, this.consider, options, this.moreOptions, this.sprintMode, this.ignoreFriends, this.wallBypass, this.critmode, this.correctionType, this.predict, this.predictStrength});
 this.autoPotion = autoPotion;
    }

    @Subscribe
 public void onInput(EventInput eventInput) {
if (this.inputTick > 0) {
eventInput.setForward(0.0F);
--this.inputTick;
        }

 this.handleSprinting(eventInput);
if ((Boolean)options.getValueByName("Коррекция движения").get() && this.correctionType.is("Свободный") && this.canWork) {
            MoveUtils.fixMovement(eventInput, rotateVector.x);
        }

    }

 private void handleSprinting(EventInput eventInput) {
        Minecraft mc = Minecraft.getInstance();
if (Minecraft.player != null && target != null) {
boolean shouldCancelSprint = this.shouldCancelSprint();
 if (shouldCancelSprint) {
eventInput.setSprintState(false);
 if (Minecraft.player.isSprinting()) {
Minecraft.player.setSprinting(false);
                }
            }
        }

    }

 private boolean shouldCancelSprint() {
if (target == null) {
 return false;
} else {
float[] ranges = this.getRanges();
            Minecraft var10000 = mc;
double distance = (double)Minecraft.player.getDistance(target);
if (this.sprintMode.is("Быстрый")) {
return distance <= (double)(ranges[0] + 1.0F);
} else {
return distance <= (double)(ranges[0] + 0.5F);
            }
        }
    }

 private float[] getRanges() {
return new float[]{(float)this.attackRange.getValue(), 1.0F};
    }

    @Subscribe
 public void onUpdate(EventUpdate e) {
if (this.canWork) {
if ((Boolean)options.getValueByName("Фокусировать одну цель").get() && (target == null || !this.isValidForNav(target, additionalNavRange())) || !(Boolean)options.getValueByName("Фокусировать одну цель").get()) {
 this.updateTarget();
            }

if (target != null) {
this.isRotated = false;
if (this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed()) {
this.ticks = 2;
this.tpAuraRule = true;
 this.updateAttack();
this.tpAuraRule = false;
                }

if (!this.isRotated) {
 this.setRotate();
                }
} else {
this.stopWatch.setLastMS(0L);
 this.reset();
            }
        }

    }

    @Subscribe
 private void onWalking(EventMotion e) {
if (target != null) {
            e.setYaw(rotateVector.x);
            e.setPitch(rotateVector.y);
            Minecraft.player.rotationYawHead = rotateVector.x;
Minecraft.player.renderYawOffset = this.calculateCorrectYawOffset2(rotateVector.x);
            Minecraft.player.rotationPitchHead = rotateVector.y;
        }

    }

 public void setRotate() {
if (this.type.is("SpookyTime")) {
 this.baseRotationSpookytime();
} else if (this.type.is("FunTime")) {
 this.funTimeRotation();
} else if (this.type.is("ReallyWorld")) {
 this.reallyWorldRotation();
} else if (this.type.is("HolyWorld")) {
 this.holyWorldRotation();
        }

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

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

    }

 private void funTimeRotation() {
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(1.1, 0.3, (double)target.getHeight()), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 0.5F), 180.0F);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 0.5F), 90.0F);
clampedPitch /= 0.425F;
clampedYaw /= 0.525F;
if (Math.abs(clampedYaw - this.lastYaw) <= 0.35F) {
clampedYaw = this.lastYaw + 0.45F;
        }

float randomFactor = (float)(Math.random() * 0.15 - 0.075);
float smoothYaw = MathHelper.lerp(0.3F, rotateVector.x, rotateVector.x + (yawDelta > 0.0F ? clampedYaw : -clampedYaw) + randomFactor);
float smoothPitch = MathHelper.lerp(0.3F, rotateVector.y, MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? clampedPitch : -clampedPitch) + randomFactor, -80.0F, 80.0F));
 float gcd = SensUtils.getGCDValue();
        smoothYaw -= (smoothYaw - rotateVector.x) % gcd;
        smoothPitch -= (smoothPitch - rotateVector.y) % gcd;
rotateVector = new Vector2f(smoothYaw, smoothPitch);
 this.lastYaw = clampedYaw;
 this.lastPitch = clampedPitch;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft.player.rotationYawOffset = smoothYaw;
        }

    }

 private void reallyWorldRotation() {
double heightOffset = (double)target.getHeight() * 0.9;
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(Minecraft.player.getPosYEye() - target.getPosY(), (double)0.0F, heightOffset), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
 float currentYaw = Minecraft.player.rotationYaw;
 float currentPitch = Minecraft.player.rotationPitch;
float targetYaw = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float targetPitch = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
targetPitch = MathHelper.clamp(targetPitch, -89.0F, 89.0F);
boolean attack = this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed();
 if (attack) {
 float yawDelta1 = MathHelper.wrapDegrees(targetYaw - rotateVector.x);
 float pitchDelta1 = MathHelper.wrapDegrees(targetPitch - rotateVector.y);
float baseSpeed = 95.0F;
float accelFactor = 3.5F;
float snapSpeed = baseSpeed * (1.0F + Math.min(Math.abs(yawDelta1) / 90.0F, 1.0F) * (accelFactor - 1.0F));
float snapFactor = Math.min(1.0F, snapSpeed / Math.max(1.0F, Math.abs(yawDelta1)));
 float snapYaw = rotateVector.x + yawDelta1 * snapFactor;
snapSpeed = baseSpeed * (1.0F + Math.min(Math.abs(pitchDelta1) / 90.0F, 1.0F) * (accelFactor - 1.0F));
snapFactor = Math.min(1.0F, snapSpeed / Math.max(1.0F, Math.abs(pitchDelta1)));
 float snapPitch = rotateVector.y + pitchDelta1 * snapFactor;
if (Math.abs(MathHelper.wrapDegrees(targetYaw - snapYaw)) < 0.1F) {
                snapYaw = targetYaw;
            }

if (Math.abs(MathHelper.wrapDegrees(targetPitch - snapPitch)) < 0.1F) {
                snapPitch = targetPitch;
            }

rotateVector = new Vector2f(snapYaw, snapPitch);
} else {
float returnSpeed = 80.0F;
 float yawDiff = MathHelper.wrapDegrees(currentYaw - rotateVector.x);
 float pitchDiff = MathHelper.wrapDegrees(currentPitch - rotateVector.y);
float returnFactor = Math.min(1.0F, returnSpeed / Math.max(1.0F, Math.abs(yawDiff)));
 float returnYaw = rotateVector.x + yawDiff * returnFactor;
returnFactor = Math.min(1.0F, returnSpeed / Math.max(1.0F, Math.abs(pitchDiff)));
 float returnPitch = rotateVector.y + pitchDiff * returnFactor;
rotateVector = new Vector2f(returnYaw, returnPitch);
        }

 this.lastYaw = rotateVector.x;
 this.lastPitch = rotateVector.y;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft.player.rotationYawOffset = rotateVector.x;
        }

    }

 private void holyWorldRotation() {
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(1.1, 0.3, (double)target.getHeight()), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float yawSpeed = Math.min(Math.max(Math.abs(yawDelta), 1.0F), 160.0F);
float pitchSpeed = Math.min(Math.max(Math.abs(pitchDelta), 1.0F), 70.0F);
float yaw = rotateVector.x + (yawDelta > 0.0F ? yawSpeed : -yawSpeed);
float pitch = MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? pitchSpeed : -pitchSpeed), -89.0F, 89.0F);
float twitchIntensity = 0.15F;
float twitchFrequency = 0.03F;
        Minecraft var10000 = mc;
if (Minecraft.player.ticksExisted % Math.max(1, (int)(twitchFrequency * 15.0F)) == 0) {
yaw += (float)(Math.random() - (double)0.5F) * twitchIntensity;
pitch += (float)(Math.random() - (double)0.5F) * twitchIntensity;
        }

yaw += (float)(Math.random() - (double)0.5F) * 0.03F;
pitch += (float)(Math.random() - (double)0.5F) * 0.03F;
 float gcd = SensUtils.getGCDValue();
float gcdRandomizer = (float)(Math.random() * (double)0.008F + (double)0.996F);
        yaw -= (yaw - rotateVector.x) % (gcd * gcdRandomizer);
        pitch -= (pitch - rotateVector.y) % (gcd * gcdRandomizer);
float maxYawChange = 40.0F;
float maxPitchChange = 35.0F;
        yaw = rotateVector.x + MathHelper.clamp(yaw - rotateVector.x, -maxYawChange, maxYawChange);
pitch = MathHelper.clamp(rotateVector.y + MathHelper.clamp(pitch - rotateVector.y, -maxPitchChange, maxPitchChange), -89.0F, 89.0F);
rotateVector = new Vector2f(yaw, pitch);
 this.lastYaw = yaw;
 this.lastPitch = pitch;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            var10000 = mc;
            Minecraft.player.rotationYawOffset = yaw;
        }

    }

private Vector3d getPredictedPosition(LivingEntity t, float strength) {
 float yaw = t.rotationYaw;
 float pitch = t.rotationPitch;
double yawRad = Math.toRadians((double)yaw);
double pitchRad = Math.toRadians((double)pitch);
 double x = -Math.sin(yawRad) * Math.cos(pitchRad);
 double y = -Math.sin(pitchRad);
 double z = Math.cos(yawRad) * Math.cos(pitchRad);
Vector3d lookVec = new Vector3d(x, y, z);
return t.getPositionVec().add(lookVec.scale((double)strength));
    }

 private void baseRotationSpookytime() {
Vector3d vec = (Boolean)this.predict.get() && target != null ? this.getPredictedPosition(target, (Float)this.predictStrength.get()) : target.getPositionVec();
        Minecraft var10002 = mc;
 double var28 = Minecraft.player.getPosYEye() - target.getPosY();
double var10004 = (double)target.getHeight();
        Minecraft var10006 = mc;
Vector3d var10000 = vec.add((double)0.0F, MathHelper.clamp(var28, (double)0.0F, var10004 - (double)1.0F * (Minecraft.player.getDistanceEyePos(target) / (double)this.attackDistance())), (double)0.0F);
        Minecraft var10001 = mc;
vec = var10000.subtract(Minecraft.player.getEyePosition(1.0F));
this.isRotated = true;
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 0.5F), 70.8F);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 0.0F), 12.3F);
float targetYaw = rotateVector.x + (yawDelta > 1.0F ? clampedYaw : -clampedYaw);
float targetPitch = rotateVector.y + (pitchDelta > 0.5F ? clampedPitch : -clampedPitch);
float lerpFactor = 0.687F;
 float yaw = rotateVector.x + (targetYaw - rotateVector.x) * lerpFactor;
 float pitch = rotateVector.y + (targetPitch - rotateVector.y) * lerpFactor;
float time = (float)(System.currentTimeMillis() % 10000L) / 720.0F;
float oscillationAmplitudeYaw = 7.8F;
float oscillationFrequencyYaw = 2.7F;
float yawOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyYaw) * oscillationAmplitudeYaw;
        yaw += yawOscillation;
float oscillationAmplitudePitch = 2.6F;
float oscillationFrequencyPitch = 2.9F;
float pitchOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyPitch) * oscillationAmplitudePitch;
        pitch += pitchOscillation;
pitch = MathHelper.clamp(pitch, -89.0F, 90.0F);
 float gcd = SensUtils.getGCDValue();
        yaw -= (yaw - rotateVector.x) % gcd;
        pitch -= (pitch - rotateVector.y) % gcd;
rotateVector = new Vector2f(yaw, pitch);
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft var27 = mc;
            Minecraft.player.rotationYawOffset = yaw;
        }

    }

 public float attackDistance() {
if ((Boolean)options.getValueByName("Оптимальная дистанция атаки").get()) {
            Minecraft var10000 = mc;
return !Minecraft.player.isSwimming() ? 3.6F : 3.0F;
} else {
return (Float)this.attackRange.get();
        }
    }

 float maxRange() {
float var10000 = this.attackDistance();
        Minecraft var10001 = mc;
return var10000 + (Minecraft.player.isElytraFlying() ? (Float)this.elytraRange.get() : 0.0F);
    }

 private static float additionalNavRange() {
return 7.0F;
    }

 private void updateTarget() {
List<LivingEntity> targetsList = new ArrayList();
 float navRange = additionalNavRange();
        Minecraft var10000 = mc;
        ObjectIterator var4 = Minecraft.world.getAllEntities().iterator();

 while(var4.hasNext()) {
            Entity entity = (Entity)var4.next();
if (entity instanceof LivingEntity living) {
if (this.isValidForNav(living, navRange)) {
                    targetsList.add(living);
                }
            }
        }

 if (targetsList.isEmpty()) {
target = null;
} else if (targetsList.size() == 1) {
target = (LivingEntity)targetsList.get(0);
} else {
targetsList.sort(Comparator.comparingDouble((entityx) -> this.entityMathUtil((Entity)entityx, (Boolean)this.consider.getValueByName("Хп").get(), (Boolean)this.consider.getValueByName("Броню").get(), (Boolean)this.consider.getValueByName("Дистанцию").get(), (double)this.maxRange(), (Boolean)this.consider.getValueByName("Баффы").get())).reversed());
target = (LivingEntity)targetsList.get(0);
        }

    }

private double entityMathUtil(Entity entity, boolean considerHp, boolean considerArmor, boolean considerDistance, double maxRange, boolean considerBuffs) {
double score = (double)0.0F;
if (entity instanceof LivingEntity living) {
 if (considerDistance) {
                Minecraft var10000 = mc;
double distance = (double)Minecraft.player.getDistance(entity);
double distanceScore = Math.max((double)0.0F, maxRange - distance);
score += distanceScore * (double)10.0F;
            }

 if (considerHp) {
double hp = (double)(living.getHealth() + living.getAbsorptionAmount());
double hpScore = Math.max((double)0.0F, (double)40.0F - hp);
score += hpScore * (double)2.0F;
            }

if (considerArmor && entity instanceof PlayerEntity) {
 int armor = ((PlayerEntity)entity).getTotalArmorValue();
double armorScore = (double)Math.max(0, 20 - armor);
score += armorScore * (double)1.5F;
            }
        }

 return score;
    }

private boolean isValidForNav(LivingEntity entity, float navRange) {
if (entity instanceof ClientPlayerEntity) {
 return false;
} else if (entity.ticksExisted < 3) {
 return false;
} else {
            Minecraft var10000 = mc;
if (Minecraft.player.getDistanceEyePos(entity) > (double)navRange) {
 return false;
} else {
if (entity instanceof PlayerEntity) {
                    PlayerEntity p = (PlayerEntity)entity;
 if (!entity.getUniqueID().equals(PlayerEntity.getOfflineUUID(p.getGameProfile().getName()))) {
 return false;
                    }

if ((Boolean)this.ignoreFriends.get() && FriendStorage.isFriend(p.getName().getString())) {
 return false;
                    }

                    String var4 = p.getName().getString();
                    Minecraft var10001 = mc;
 if (var4.equalsIgnoreCase(Minecraft.player.getName().getString())) {
 return false;
                    }
                }

if (entity instanceof PlayerEntity && !(Boolean)this.targets.getValueByName("Игроки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.getTotalArmorValue() == 0 && !(Boolean)this.targets.getValueByName("Голые").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.isInvisible() && entity.getTotalArmorValue() == 0 && !(Boolean)this.targets.getValueByName("Голые невидимки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.isInvisible() && !(Boolean)this.targets.getValueByName("Невидимки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && ((PlayerEntity)entity).isCreative()) {
 return false;
} else if (entity instanceof MonsterEntity && !(Boolean)this.targets.getValueByName("Мобы").get()) {
 return false;
} else if (entity instanceof AnimalEntity && !(Boolean)this.targets.getValueByName("Животные").get()) {
 return false;
} else {
return !entity.isInvulnerable() && entity.isAlive() && !(entity instanceof ArmorStandEntity);
                }
            }
        }
    }

 private boolean isPlayerEating() {
        Minecraft var10000 = mc;
 if (!Minecraft.player.isHandActive()) {
 return false;
} else {
            var10000 = mc;
            UseAction action = Minecraft.player.getActiveItemStack().getUseAction();
 return action == UseAction.EAT || action == UseAction.DRINK;
        }
    }

 private void updateAttack() {
this.selected = MouseUtil.getMouseOver(target, rotateVector.x, rotateVector.y, (double)this.attackDistance());
        Minecraft var10000 = mc;
if (!(Minecraft.player.getDistanceEyePos(target) > (double)this.attackDistance())) {
if ((Boolean)this.moreOptions.getValueByName("Проверка луча").get()) {
                var10000 = mc;
if (!Minecraft.player.isElytraFlying() && this.selected == null) {
 return;
                }
            }

if (!(Boolean)this.moreOptions.getValueByName("Бить через стены").get()) {
                var10000 = mc;
 if (!Minecraft.player.canEntityBeSeen(target)) {
 return;
                }
} else if ((Boolean)this.wallBypass.get()) {
                var10000 = mc;
 if (!Minecraft.player.canEntityBeSeen(target)) {
target.getPosition().add((double)this.randomUtil(-0.15F, 0.15F), target.getBoundingBox().getYSize(), (double)this.randomUtil(-0.15F, 0.15F));
                }
            }

if ((!(Boolean)this.moreOptions.getValueByName("Не бить если кушаешь").get() || !this.isPlayerEating()) && (!(Boolean)this.moreOptions.getValueByName("Не бить если в гуи").get() || mc.currentScreen == null || mc.currentScreen instanceof ChatScreen || mc.currentScreen instanceof IngameMenuScreen) && (!(Boolean)this.ignoreFriends.get() || !(target instanceof PlayerEntity) || !FriendStorage.isFriend(target.getName().getString()))) {
this.inputTick = 1;
                Minecraft var100001 = mc;
 if (Minecraft.player.serverSprintState) {
 return;
                }

this.stopWatch.setLastMS(500L);
                Minecraft var10001 = mc;
                var100001 = mc;
                Minecraft.playerController.attackEntity(Minecraft.player, target);
                var10000 = mc;
                Minecraft.player.swingArm(Hand.MAIN_HAND);
            }
        }

    }

private float randomUtil(float min, float max) {
return min + (max - min) * (new SecureRandom()).nextFloat();
    }

 public boolean shouldPlayerFalling() {
return this.isPlayerFalling(this.critmode.is("Только криты"), this.critmode.is("Умные криты"), (Boolean)options.getValueByName("Синхронизировать с TPS").get());
    }

private boolean isPlayerFalling(boolean onlyCrits, boolean smartCrits, boolean syncWithTPS) {
 if (!onlyCrits) {
 return true;
} else if (smartCrits) {
return !Minecraft.player.isOnGround() && Minecraft.player.fallDistance > 0.0F;
} else {
return !Minecraft.player.isOnGround() && Minecraft.player.fallDistance > 0.0F;
        }
    }

 private boolean isValid(LivingEntity entity) {
return this.isValidForNav(entity, this.maxRange());
    }

 private void reset() {
        Minecraft var10000 = mc;
Minecraft.player.rotationYawOffset = (float)Integer.MIN_VALUE;
        Minecraft var10003 = mc;
        Minecraft var10004 = mc;
rotateVector = new Vector2f(Minecraft.player.rotationYaw, Minecraft.player.rotationPitch);
    }

private float calculateCorrectYawOffset2(float yaw) {
 return yaw;
    }

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

 public boolean onDisable() {
 super.onDisable();
        Minecraft mc = Minecraft.getInstance();
if (Minecraft.player != null && Minecraft.player.isSprinting()) {
Minecraft.player.setSprinting(false);
        }

if (this.type.is("SpookyTime") && Minecraft.player != null) {
            Minecraft.player.rotationYaw = rotateVector.x;
            Minecraft.player.rotationPitch = rotateVector.y;
            Minecraft.player.rotationYawHead = rotateVector.x;
            Minecraft.player.renderYawOffset = rotateVector.x;
            Minecraft.player.rotationPitchHead = rotateVector.y;
        }

 this.reset();
this.stopWatch.setLastMS(0L);
target = null;
mc.timer.timerSpeed = 1.0F;
 return false;
    }

 public ModeSetting getType() {
 return this.type;
    }

 public ModeListSetting getOptions() {
 return options;
    }

 public ModeListSetting getMoreOptions() {
 return this.moreOptions;
    }

 public StopWatch getStopWatch() {
 return this.stopWatch;
    }

 public void setTarget(LivingEntity target) {
        KillAura.target = target;
    }

 private double getEntityArmor(PlayerEntity entityPlayer2) {
double d2 = (double)0.0F;

for(int i2 = 0; i2 < 4; ++i2) {
            ItemStack is = (ItemStack)entityPlayer2.inventory.armorInventory.get(i2);
if (is.getItem() instanceof ArmorItem) {
d2 += this.getProtectionLvl(is);
            }
        }

 return d2;
    }

 private double getProtectionLvl(ItemStack stack) {
        Item var3 = stack.getItem();
if (var3 instanceof ArmorItem i) {
double damageReduceAmount = (double)i.getDamageReduceAmount();
 if (stack.isEnchanted()) {
damageReduceAmount += (double)EnchantmentHelper.getEnchantmentLevel(Enchantments.PROTECTION, stack) * (double)0.25F;
            }

 return damageReduceAmount;
} else {
return (double)0.0F;
        }
    }

 private double getEntityHealth(LivingEntity ent) {
if (ent instanceof PlayerEntity player) {
return (double)(player.getHealth() + player.getAbsorptionAmount()) * (this.getEntityArmor(player) / (double)20.0F);
} else {
return (double)(ent.getHealth() + ent.getAbsorptionAmount());
        }
    }

 public static LivingEntity getTarget() {
 return target;
    }
}
 
Сливаю килку титаниум клиента (этот клиент кидал и кидает ратки)
Не советую использовать это чудище чата гпт, думаю что ничего не обходит
а так же у него есть похожие говно пасты клиенты под говно сервера
по коду чекнул, там дебуда 1 в 1
Java:
Expand Collapse Copy
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package dev.akven.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import dev.akven.command.friends.FriendStorage;
import dev.akven.events.EventInput;
import dev.akven.events.EventMotion;
import dev.akven.events.EventUpdate;
import dev.akven.functions.api.Category;
import dev.akven.functions.api.Function;
import dev.akven.functions.api.FunctionRegister;
import dev.akven.functions.settings.Setting;
import dev.akven.functions.settings.impl.BooleanSetting;
import dev.akven.functions.settings.impl.ModeListSetting;
import dev.akven.functions.settings.impl.ModeSetting;
import dev.akven.functions.settings.impl.SliderSetting;
import dev.akven.utils.math.SensUtils;
import dev.akven.utils.math.StopWatch;
import dev.akven.utils.player.MouseUtil;
import dev.akven.utils.player.MoveUtils;
import it.unimi.dsi.fastutil.objects.ObjectIterator;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.IngameMenuScreen;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.item.ArmorStandEntity;
import net.minecraft.entity.monster.MonsterEntity;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.UseAction;
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;

@FunctionRegister(
name = "Aura",
    type = Category.Combat
)
public class KillAura extends Function {
private final ModeSetting type = new ModeSetting("Режим ротации", "SpookyTime", new String[]{"SpookyTime", "FunTime", "ReallyWorld", "HolyWorld"});
private final SliderSetting attackRange = new SliderSetting("Дистанция аттаки", 3.0F, 2.5F, 12.0F, 0.05F);
private final SliderSetting elytraRange = new SliderSetting("Дистанция на элитре", 6.0F, 0.0F, 16.0F, 0.05F);
private final BooleanSetting predict = new BooleanSetting("Предикт", false);
private final SliderSetting predictStrength = (new SliderSetting("Сила предикта", 0.2F, 0.1F, 0.3F, 0.05F)).setVisible(() -> (Boolean)this.predict.get());
final ModeListSetting targets = new ModeListSetting("Таргеты", new BooleanSetting[]{new BooleanSetting("Игроки", true), new BooleanSetting("Голые", true), new BooleanSetting("Мобы", false), new BooleanSetting("Животные", false), new BooleanSetting("Голые невидимки", true), new BooleanSetting("Невидимки", true)});
final ModeListSetting consider = new ModeListSetting("Учитывать", new BooleanSetting[]{new BooleanSetting("Хп", true), new BooleanSetting("Броню", true), new BooleanSetting("Дистанцию", true), new BooleanSetting("Баффы", true)});
public static ModeListSetting options = new ModeListSetting("Опции", new BooleanSetting[]{new BooleanSetting("Только криты", true), new BooleanSetting("Синхронизировать с TPS", false), new BooleanSetting("Фокусировать одну цель", true), new BooleanSetting("Коррекция движения", true), new BooleanSetting("Оптимальная дистанция атаки", false), new BooleanSetting("Резольвер", false)});
final ModeListSetting moreOptions = new ModeListSetting("Триггеры", new BooleanSetting[]{new BooleanSetting("Проверка луча", true), new BooleanSetting("Бить через стены", true), new BooleanSetting("Не бить если кушаешь", true), new BooleanSetting("Не бить если в гуи", true)});
private final ModeSetting sprintMode = new ModeSetting("Режим спринта", "Легитный", new String[]{"Легитный", "Быстрый"});
private final BooleanSetting ignoreFriends = new BooleanSetting("Не бить друзей", true);
private final BooleanSetting wallBypass = (new BooleanSetting("Обход Через Стены", true)).setVisible(() -> (Boolean)this.moreOptions.getValueByName("Бить через стены").get());
private final ModeSetting critmode = new ModeSetting("Тип критов", "Только криты", new String[]{"Только криты", "Умные криты"});
private final ModeSetting correctionType = (new ModeSetting("Тип коррекции", "Свободный", new String[]{"Свободный", "Сфокусированный"})).setVisible(() -> (Boolean)options.getValueByName("Коррекция движения").get());
private final StopWatch stopWatch = new StopWatch();
public static Vector2f rotateVector = new Vector2f(0.0F, 0.0F);
 public static LivingEntity target;
private boolean sprintReset = false;
 private Entity selected;
int ticks = 0;
int inputTick = 0;
boolean isRotated = false;
boolean canWork = true;
boolean tpAuraRule = false;
 final AutoPotion autoPotion;
 float lastYaw;
 float lastPitch;

 public KillAura(AutoPotion autoPotion) {
this.addSettings(new Setting[]{this.type, this.attackRange, this.elytraRange, this.targets, this.consider, options, this.moreOptions, this.sprintMode, this.ignoreFriends, this.wallBypass, this.critmode, this.correctionType, this.predict, this.predictStrength});
 this.autoPotion = autoPotion;
    }

    @Subscribe
 public void onInput(EventInput eventInput) {
if (this.inputTick > 0) {
eventInput.setForward(0.0F);
--this.inputTick;
        }

 this.handleSprinting(eventInput);
if ((Boolean)options.getValueByName("Коррекция движения").get() && this.correctionType.is("Свободный") && this.canWork) {
            MoveUtils.fixMovement(eventInput, rotateVector.x);
        }

    }

 private void handleSprinting(EventInput eventInput) {
        Minecraft mc = Minecraft.getInstance();
if (Minecraft.player != null && target != null) {
boolean shouldCancelSprint = this.shouldCancelSprint();
 if (shouldCancelSprint) {
eventInput.setSprintState(false);
 if (Minecraft.player.isSprinting()) {
Minecraft.player.setSprinting(false);
                }
            }
        }

    }

 private boolean shouldCancelSprint() {
if (target == null) {
 return false;
} else {
float[] ranges = this.getRanges();
            Minecraft var10000 = mc;
double distance = (double)Minecraft.player.getDistance(target);
if (this.sprintMode.is("Быстрый")) {
return distance <= (double)(ranges[0] + 1.0F);
} else {
return distance <= (double)(ranges[0] + 0.5F);
            }
        }
    }

 private float[] getRanges() {
return new float[]{(float)this.attackRange.getValue(), 1.0F};
    }

    @Subscribe
 public void onUpdate(EventUpdate e) {
if (this.canWork) {
if ((Boolean)options.getValueByName("Фокусировать одну цель").get() && (target == null || !this.isValidForNav(target, additionalNavRange())) || !(Boolean)options.getValueByName("Фокусировать одну цель").get()) {
 this.updateTarget();
            }

if (target != null) {
this.isRotated = false;
if (this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed()) {
this.ticks = 2;
this.tpAuraRule = true;
 this.updateAttack();
this.tpAuraRule = false;
                }

if (!this.isRotated) {
 this.setRotate();
                }
} else {
this.stopWatch.setLastMS(0L);
 this.reset();
            }
        }

    }

    @Subscribe
 private void onWalking(EventMotion e) {
if (target != null) {
            e.setYaw(rotateVector.x);
            e.setPitch(rotateVector.y);
            Minecraft.player.rotationYawHead = rotateVector.x;
Minecraft.player.renderYawOffset = this.calculateCorrectYawOffset2(rotateVector.x);
            Minecraft.player.rotationPitchHead = rotateVector.y;
        }

    }

 public void setRotate() {
if (this.type.is("SpookyTime")) {
 this.baseRotationSpookytime();
} else if (this.type.is("FunTime")) {
 this.funTimeRotation();
} else if (this.type.is("ReallyWorld")) {
 this.reallyWorldRotation();
} else if (this.type.is("HolyWorld")) {
 this.holyWorldRotation();
        }

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

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

    }

 private void funTimeRotation() {
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(1.1, 0.3, (double)target.getHeight()), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 0.5F), 180.0F);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 0.5F), 90.0F);
clampedPitch /= 0.425F;
clampedYaw /= 0.525F;
if (Math.abs(clampedYaw - this.lastYaw) <= 0.35F) {
clampedYaw = this.lastYaw + 0.45F;
        }

float randomFactor = (float)(Math.random() * 0.15 - 0.075);
float smoothYaw = MathHelper.lerp(0.3F, rotateVector.x, rotateVector.x + (yawDelta > 0.0F ? clampedYaw : -clampedYaw) + randomFactor);
float smoothPitch = MathHelper.lerp(0.3F, rotateVector.y, MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? clampedPitch : -clampedPitch) + randomFactor, -80.0F, 80.0F));
 float gcd = SensUtils.getGCDValue();
        smoothYaw -= (smoothYaw - rotateVector.x) % gcd;
        smoothPitch -= (smoothPitch - rotateVector.y) % gcd;
rotateVector = new Vector2f(smoothYaw, smoothPitch);
 this.lastYaw = clampedYaw;
 this.lastPitch = clampedPitch;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft.player.rotationYawOffset = smoothYaw;
        }

    }

 private void reallyWorldRotation() {
double heightOffset = (double)target.getHeight() * 0.9;
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(Minecraft.player.getPosYEye() - target.getPosY(), (double)0.0F, heightOffset), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
 float currentYaw = Minecraft.player.rotationYaw;
 float currentPitch = Minecraft.player.rotationPitch;
float targetYaw = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float targetPitch = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
targetPitch = MathHelper.clamp(targetPitch, -89.0F, 89.0F);
boolean attack = this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed();
 if (attack) {
 float yawDelta1 = MathHelper.wrapDegrees(targetYaw - rotateVector.x);
 float pitchDelta1 = MathHelper.wrapDegrees(targetPitch - rotateVector.y);
float baseSpeed = 95.0F;
float accelFactor = 3.5F;
float snapSpeed = baseSpeed * (1.0F + Math.min(Math.abs(yawDelta1) / 90.0F, 1.0F) * (accelFactor - 1.0F));
float snapFactor = Math.min(1.0F, snapSpeed / Math.max(1.0F, Math.abs(yawDelta1)));
 float snapYaw = rotateVector.x + yawDelta1 * snapFactor;
snapSpeed = baseSpeed * (1.0F + Math.min(Math.abs(pitchDelta1) / 90.0F, 1.0F) * (accelFactor - 1.0F));
snapFactor = Math.min(1.0F, snapSpeed / Math.max(1.0F, Math.abs(pitchDelta1)));
 float snapPitch = rotateVector.y + pitchDelta1 * snapFactor;
if (Math.abs(MathHelper.wrapDegrees(targetYaw - snapYaw)) < 0.1F) {
                snapYaw = targetYaw;
            }

if (Math.abs(MathHelper.wrapDegrees(targetPitch - snapPitch)) < 0.1F) {
                snapPitch = targetPitch;
            }

rotateVector = new Vector2f(snapYaw, snapPitch);
} else {
float returnSpeed = 80.0F;
 float yawDiff = MathHelper.wrapDegrees(currentYaw - rotateVector.x);
 float pitchDiff = MathHelper.wrapDegrees(currentPitch - rotateVector.y);
float returnFactor = Math.min(1.0F, returnSpeed / Math.max(1.0F, Math.abs(yawDiff)));
 float returnYaw = rotateVector.x + yawDiff * returnFactor;
returnFactor = Math.min(1.0F, returnSpeed / Math.max(1.0F, Math.abs(pitchDiff)));
 float returnPitch = rotateVector.y + pitchDiff * returnFactor;
rotateVector = new Vector2f(returnYaw, returnPitch);
        }

 this.lastYaw = rotateVector.x;
 this.lastPitch = rotateVector.y;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft.player.rotationYawOffset = rotateVector.x;
        }

    }

 private void holyWorldRotation() {
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(1.1, 0.3, (double)target.getHeight()), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float yawSpeed = Math.min(Math.max(Math.abs(yawDelta), 1.0F), 160.0F);
float pitchSpeed = Math.min(Math.max(Math.abs(pitchDelta), 1.0F), 70.0F);
float yaw = rotateVector.x + (yawDelta > 0.0F ? yawSpeed : -yawSpeed);
float pitch = MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? pitchSpeed : -pitchSpeed), -89.0F, 89.0F);
float twitchIntensity = 0.15F;
float twitchFrequency = 0.03F;
        Minecraft var10000 = mc;
if (Minecraft.player.ticksExisted % Math.max(1, (int)(twitchFrequency * 15.0F)) == 0) {
yaw += (float)(Math.random() - (double)0.5F) * twitchIntensity;
pitch += (float)(Math.random() - (double)0.5F) * twitchIntensity;
        }

yaw += (float)(Math.random() - (double)0.5F) * 0.03F;
pitch += (float)(Math.random() - (double)0.5F) * 0.03F;
 float gcd = SensUtils.getGCDValue();
float gcdRandomizer = (float)(Math.random() * (double)0.008F + (double)0.996F);
        yaw -= (yaw - rotateVector.x) % (gcd * gcdRandomizer);
        pitch -= (pitch - rotateVector.y) % (gcd * gcdRandomizer);
float maxYawChange = 40.0F;
float maxPitchChange = 35.0F;
        yaw = rotateVector.x + MathHelper.clamp(yaw - rotateVector.x, -maxYawChange, maxYawChange);
pitch = MathHelper.clamp(rotateVector.y + MathHelper.clamp(pitch - rotateVector.y, -maxPitchChange, maxPitchChange), -89.0F, 89.0F);
rotateVector = new Vector2f(yaw, pitch);
 this.lastYaw = yaw;
 this.lastPitch = pitch;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            var10000 = mc;
            Minecraft.player.rotationYawOffset = yaw;
        }

    }

private Vector3d getPredictedPosition(LivingEntity t, float strength) {
 float yaw = t.rotationYaw;
 float pitch = t.rotationPitch;
double yawRad = Math.toRadians((double)yaw);
double pitchRad = Math.toRadians((double)pitch);
 double x = -Math.sin(yawRad) * Math.cos(pitchRad);
 double y = -Math.sin(pitchRad);
 double z = Math.cos(yawRad) * Math.cos(pitchRad);
Vector3d lookVec = new Vector3d(x, y, z);
return t.getPositionVec().add(lookVec.scale((double)strength));
    }

 private void baseRotationSpookytime() {
Vector3d vec = (Boolean)this.predict.get() && target != null ? this.getPredictedPosition(target, (Float)this.predictStrength.get()) : target.getPositionVec();
        Minecraft var10002 = mc;
 double var28 = Minecraft.player.getPosYEye() - target.getPosY();
double var10004 = (double)target.getHeight();
        Minecraft var10006 = mc;
Vector3d var10000 = vec.add((double)0.0F, MathHelper.clamp(var28, (double)0.0F, var10004 - (double)1.0F * (Minecraft.player.getDistanceEyePos(target) / (double)this.attackDistance())), (double)0.0F);
        Minecraft var10001 = mc;
vec = var10000.subtract(Minecraft.player.getEyePosition(1.0F));
this.isRotated = true;
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 0.5F), 70.8F);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 0.0F), 12.3F);
float targetYaw = rotateVector.x + (yawDelta > 1.0F ? clampedYaw : -clampedYaw);
float targetPitch = rotateVector.y + (pitchDelta > 0.5F ? clampedPitch : -clampedPitch);
float lerpFactor = 0.687F;
 float yaw = rotateVector.x + (targetYaw - rotateVector.x) * lerpFactor;
 float pitch = rotateVector.y + (targetPitch - rotateVector.y) * lerpFactor;
float time = (float)(System.currentTimeMillis() % 10000L) / 720.0F;
float oscillationAmplitudeYaw = 7.8F;
float oscillationFrequencyYaw = 2.7F;
float yawOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyYaw) * oscillationAmplitudeYaw;
        yaw += yawOscillation;
float oscillationAmplitudePitch = 2.6F;
float oscillationFrequencyPitch = 2.9F;
float pitchOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyPitch) * oscillationAmplitudePitch;
        pitch += pitchOscillation;
pitch = MathHelper.clamp(pitch, -89.0F, 90.0F);
 float gcd = SensUtils.getGCDValue();
        yaw -= (yaw - rotateVector.x) % gcd;
        pitch -= (pitch - rotateVector.y) % gcd;
rotateVector = new Vector2f(yaw, pitch);
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft var27 = mc;
            Minecraft.player.rotationYawOffset = yaw;
        }

    }

 public float attackDistance() {
if ((Boolean)options.getValueByName("Оптимальная дистанция атаки").get()) {
            Minecraft var10000 = mc;
return !Minecraft.player.isSwimming() ? 3.6F : 3.0F;
} else {
return (Float)this.attackRange.get();
        }
    }

 float maxRange() {
float var10000 = this.attackDistance();
        Minecraft var10001 = mc;
return var10000 + (Minecraft.player.isElytraFlying() ? (Float)this.elytraRange.get() : 0.0F);
    }

 private static float additionalNavRange() {
return 7.0F;
    }

 private void updateTarget() {
List<LivingEntity> targetsList = new ArrayList();
 float navRange = additionalNavRange();
        Minecraft var10000 = mc;
        ObjectIterator var4 = Minecraft.world.getAllEntities().iterator();

 while(var4.hasNext()) {
            Entity entity = (Entity)var4.next();
if (entity instanceof LivingEntity living) {
if (this.isValidForNav(living, navRange)) {
                    targetsList.add(living);
                }
            }
        }

 if (targetsList.isEmpty()) {
target = null;
} else if (targetsList.size() == 1) {
target = (LivingEntity)targetsList.get(0);
} else {
targetsList.sort(Comparator.comparingDouble((entityx) -> this.entityMathUtil((Entity)entityx, (Boolean)this.consider.getValueByName("Хп").get(), (Boolean)this.consider.getValueByName("Броню").get(), (Boolean)this.consider.getValueByName("Дистанцию").get(), (double)this.maxRange(), (Boolean)this.consider.getValueByName("Баффы").get())).reversed());
target = (LivingEntity)targetsList.get(0);
        }

    }

private double entityMathUtil(Entity entity, boolean considerHp, boolean considerArmor, boolean considerDistance, double maxRange, boolean considerBuffs) {
double score = (double)0.0F;
if (entity instanceof LivingEntity living) {
 if (considerDistance) {
                Minecraft var10000 = mc;
double distance = (double)Minecraft.player.getDistance(entity);
double distanceScore = Math.max((double)0.0F, maxRange - distance);
score += distanceScore * (double)10.0F;
            }

 if (considerHp) {
double hp = (double)(living.getHealth() + living.getAbsorptionAmount());
double hpScore = Math.max((double)0.0F, (double)40.0F - hp);
score += hpScore * (double)2.0F;
            }

if (considerArmor && entity instanceof PlayerEntity) {
 int armor = ((PlayerEntity)entity).getTotalArmorValue();
double armorScore = (double)Math.max(0, 20 - armor);
score += armorScore * (double)1.5F;
            }
        }

 return score;
    }

private boolean isValidForNav(LivingEntity entity, float navRange) {
if (entity instanceof ClientPlayerEntity) {
 return false;
} else if (entity.ticksExisted < 3) {
 return false;
} else {
            Minecraft var10000 = mc;
if (Minecraft.player.getDistanceEyePos(entity) > (double)navRange) {
 return false;
} else {
if (entity instanceof PlayerEntity) {
                    PlayerEntity p = (PlayerEntity)entity;
 if (!entity.getUniqueID().equals(PlayerEntity.getOfflineUUID(p.getGameProfile().getName()))) {
 return false;
                    }

if ((Boolean)this.ignoreFriends.get() && FriendStorage.isFriend(p.getName().getString())) {
 return false;
                    }

                    String var4 = p.getName().getString();
                    Minecraft var10001 = mc;
 if (var4.equalsIgnoreCase(Minecraft.player.getName().getString())) {
 return false;
                    }
                }

if (entity instanceof PlayerEntity && !(Boolean)this.targets.getValueByName("Игроки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.getTotalArmorValue() == 0 && !(Boolean)this.targets.getValueByName("Голые").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.isInvisible() && entity.getTotalArmorValue() == 0 && !(Boolean)this.targets.getValueByName("Голые невидимки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.isInvisible() && !(Boolean)this.targets.getValueByName("Невидимки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && ((PlayerEntity)entity).isCreative()) {
 return false;
} else if (entity instanceof MonsterEntity && !(Boolean)this.targets.getValueByName("Мобы").get()) {
 return false;
} else if (entity instanceof AnimalEntity && !(Boolean)this.targets.getValueByName("Животные").get()) {
 return false;
} else {
return !entity.isInvulnerable() && entity.isAlive() && !(entity instanceof ArmorStandEntity);
                }
            }
        }
    }

 private boolean isPlayerEating() {
        Minecraft var10000 = mc;
 if (!Minecraft.player.isHandActive()) {
 return false;
} else {
            var10000 = mc;
            UseAction action = Minecraft.player.getActiveItemStack().getUseAction();
 return action == UseAction.EAT || action == UseAction.DRINK;
        }
    }

 private void updateAttack() {
this.selected = MouseUtil.getMouseOver(target, rotateVector.x, rotateVector.y, (double)this.attackDistance());
        Minecraft var10000 = mc;
if (!(Minecraft.player.getDistanceEyePos(target) > (double)this.attackDistance())) {
if ((Boolean)this.moreOptions.getValueByName("Проверка луча").get()) {
                var10000 = mc;
if (!Minecraft.player.isElytraFlying() && this.selected == null) {
 return;
                }
            }

if (!(Boolean)this.moreOptions.getValueByName("Бить через стены").get()) {
                var10000 = mc;
 if (!Minecraft.player.canEntityBeSeen(target)) {
 return;
                }
} else if ((Boolean)this.wallBypass.get()) {
                var10000 = mc;
 if (!Minecraft.player.canEntityBeSeen(target)) {
target.getPosition().add((double)this.randomUtil(-0.15F, 0.15F), target.getBoundingBox().getYSize(), (double)this.randomUtil(-0.15F, 0.15F));
                }
            }

if ((!(Boolean)this.moreOptions.getValueByName("Не бить если кушаешь").get() || !this.isPlayerEating()) && (!(Boolean)this.moreOptions.getValueByName("Не бить если в гуи").get() || mc.currentScreen == null || mc.currentScreen instanceof ChatScreen || mc.currentScreen instanceof IngameMenuScreen) && (!(Boolean)this.ignoreFriends.get() || !(target instanceof PlayerEntity) || !FriendStorage.isFriend(target.getName().getString()))) {
this.inputTick = 1;
                Minecraft var100001 = mc;
 if (Minecraft.player.serverSprintState) {
 return;
                }

this.stopWatch.setLastMS(500L);
                Minecraft var10001 = mc;
                var100001 = mc;
                Minecraft.playerController.attackEntity(Minecraft.player, target);
                var10000 = mc;
                Minecraft.player.swingArm(Hand.MAIN_HAND);
            }
        }

    }

private float randomUtil(float min, float max) {
return min + (max - min) * (new SecureRandom()).nextFloat();
    }

 public boolean shouldPlayerFalling() {
return this.isPlayerFalling(this.critmode.is("Только криты"), this.critmode.is("Умные криты"), (Boolean)options.getValueByName("Синхронизировать с TPS").get());
    }

private boolean isPlayerFalling(boolean onlyCrits, boolean smartCrits, boolean syncWithTPS) {
 if (!onlyCrits) {
 return true;
} else if (smartCrits) {
return !Minecraft.player.isOnGround() && Minecraft.player.fallDistance > 0.0F;
} else {
return !Minecraft.player.isOnGround() && Minecraft.player.fallDistance > 0.0F;
        }
    }

 private boolean isValid(LivingEntity entity) {
return this.isValidForNav(entity, this.maxRange());
    }

 private void reset() {
        Minecraft var10000 = mc;
Minecraft.player.rotationYawOffset = (float)Integer.MIN_VALUE;
        Minecraft var10003 = mc;
        Minecraft var10004 = mc;
rotateVector = new Vector2f(Minecraft.player.rotationYaw, Minecraft.player.rotationPitch);
    }

private float calculateCorrectYawOffset2(float yaw) {
 return yaw;
    }

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

 public boolean onDisable() {
 super.onDisable();
        Minecraft mc = Minecraft.getInstance();
if (Minecraft.player != null && Minecraft.player.isSprinting()) {
Minecraft.player.setSprinting(false);
        }

if (this.type.is("SpookyTime") && Minecraft.player != null) {
            Minecraft.player.rotationYaw = rotateVector.x;
            Minecraft.player.rotationPitch = rotateVector.y;
            Minecraft.player.rotationYawHead = rotateVector.x;
            Minecraft.player.renderYawOffset = rotateVector.x;
            Minecraft.player.rotationPitchHead = rotateVector.y;
        }

 this.reset();
this.stopWatch.setLastMS(0L);
target = null;
mc.timer.timerSpeed = 1.0F;
 return false;
    }

 public ModeSetting getType() {
 return this.type;
    }

 public ModeListSetting getOptions() {
 return options;
    }

 public ModeListSetting getMoreOptions() {
 return this.moreOptions;
    }

 public StopWatch getStopWatch() {
 return this.stopWatch;
    }

 public void setTarget(LivingEntity target) {
        KillAura.target = target;
    }

 private double getEntityArmor(PlayerEntity entityPlayer2) {
double d2 = (double)0.0F;

for(int i2 = 0; i2 < 4; ++i2) {
            ItemStack is = (ItemStack)entityPlayer2.inventory.armorInventory.get(i2);
if (is.getItem() instanceof ArmorItem) {
d2 += this.getProtectionLvl(is);
            }
        }

 return d2;
    }

 private double getProtectionLvl(ItemStack stack) {
        Item var3 = stack.getItem();
if (var3 instanceof ArmorItem i) {
double damageReduceAmount = (double)i.getDamageReduceAmount();
 if (stack.isEnchanted()) {
damageReduceAmount += (double)EnchantmentHelper.getEnchantmentLevel(Enchantments.PROTECTION, stack) * (double)0.25F;
            }

 return damageReduceAmount;
} else {
return (double)0.0F;
        }
    }

 private double getEntityHealth(LivingEntity ent) {
if (ent instanceof PlayerEntity player) {
return (double)(player.getHealth() + player.getAbsorptionAmount()) * (this.getEntityArmor(player) / (double)20.0F);
} else {
return (double)(ent.getHealth() + ent.getAbsorptionAmount());
        }
    }

 public static LivingEntity getTarget() {
 return target;
    }
}
в принципе можно спастить
 
пойду тестит потом напишу что там да как
upd: протестил на дуэлях в ст вроде хорошая но и урон режет так 60/40
 
Последнее редактирование:
Сливаю килку титаниум клиента (этот клиент кидал и кидает ратки)
Не советую использовать это чудище чата гпт, думаю что ничего не обходит
а так же у него есть похожие говно пасты клиенты под говно сервера
по коду чекнул, там дебуда 1 в 1
Java:
Expand Collapse Copy
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package dev.akven.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import dev.akven.command.friends.FriendStorage;
import dev.akven.events.EventInput;
import dev.akven.events.EventMotion;
import dev.akven.events.EventUpdate;
import dev.akven.functions.api.Category;
import dev.akven.functions.api.Function;
import dev.akven.functions.api.FunctionRegister;
import dev.akven.functions.settings.Setting;
import dev.akven.functions.settings.impl.BooleanSetting;
import dev.akven.functions.settings.impl.ModeListSetting;
import dev.akven.functions.settings.impl.ModeSetting;
import dev.akven.functions.settings.impl.SliderSetting;
import dev.akven.utils.math.SensUtils;
import dev.akven.utils.math.StopWatch;
import dev.akven.utils.player.MouseUtil;
import dev.akven.utils.player.MoveUtils;
import it.unimi.dsi.fastutil.objects.ObjectIterator;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.IngameMenuScreen;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.item.ArmorStandEntity;
import net.minecraft.entity.monster.MonsterEntity;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.UseAction;
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;

@FunctionRegister(
name = "Aura",
    type = Category.Combat
)
public class KillAura extends Function {
private final ModeSetting type = new ModeSetting("Режим ротации", "SpookyTime", new String[]{"SpookyTime", "FunTime", "ReallyWorld", "HolyWorld"});
private final SliderSetting attackRange = new SliderSetting("Дистанция аттаки", 3.0F, 2.5F, 12.0F, 0.05F);
private final SliderSetting elytraRange = new SliderSetting("Дистанция на элитре", 6.0F, 0.0F, 16.0F, 0.05F);
private final BooleanSetting predict = new BooleanSetting("Предикт", false);
private final SliderSetting predictStrength = (new SliderSetting("Сила предикта", 0.2F, 0.1F, 0.3F, 0.05F)).setVisible(() -> (Boolean)this.predict.get());
final ModeListSetting targets = new ModeListSetting("Таргеты", new BooleanSetting[]{new BooleanSetting("Игроки", true), new BooleanSetting("Голые", true), new BooleanSetting("Мобы", false), new BooleanSetting("Животные", false), new BooleanSetting("Голые невидимки", true), new BooleanSetting("Невидимки", true)});
final ModeListSetting consider = new ModeListSetting("Учитывать", new BooleanSetting[]{new BooleanSetting("Хп", true), new BooleanSetting("Броню", true), new BooleanSetting("Дистанцию", true), new BooleanSetting("Баффы", true)});
public static ModeListSetting options = new ModeListSetting("Опции", new BooleanSetting[]{new BooleanSetting("Только криты", true), new BooleanSetting("Синхронизировать с TPS", false), new BooleanSetting("Фокусировать одну цель", true), new BooleanSetting("Коррекция движения", true), new BooleanSetting("Оптимальная дистанция атаки", false), new BooleanSetting("Резольвер", false)});
final ModeListSetting moreOptions = new ModeListSetting("Триггеры", new BooleanSetting[]{new BooleanSetting("Проверка луча", true), new BooleanSetting("Бить через стены", true), new BooleanSetting("Не бить если кушаешь", true), new BooleanSetting("Не бить если в гуи", true)});
private final ModeSetting sprintMode = new ModeSetting("Режим спринта", "Легитный", new String[]{"Легитный", "Быстрый"});
private final BooleanSetting ignoreFriends = new BooleanSetting("Не бить друзей", true);
private final BooleanSetting wallBypass = (new BooleanSetting("Обход Через Стены", true)).setVisible(() -> (Boolean)this.moreOptions.getValueByName("Бить через стены").get());
private final ModeSetting critmode = new ModeSetting("Тип критов", "Только криты", new String[]{"Только криты", "Умные криты"});
private final ModeSetting correctionType = (new ModeSetting("Тип коррекции", "Свободный", new String[]{"Свободный", "Сфокусированный"})).setVisible(() -> (Boolean)options.getValueByName("Коррекция движения").get());
private final StopWatch stopWatch = new StopWatch();
public static Vector2f rotateVector = new Vector2f(0.0F, 0.0F);
 public static LivingEntity target;
private boolean sprintReset = false;
 private Entity selected;
int ticks = 0;
int inputTick = 0;
boolean isRotated = false;
boolean canWork = true;
boolean tpAuraRule = false;
 final AutoPotion autoPotion;
 float lastYaw;
 float lastPitch;

 public KillAura(AutoPotion autoPotion) {
this.addSettings(new Setting[]{this.type, this.attackRange, this.elytraRange, this.targets, this.consider, options, this.moreOptions, this.sprintMode, this.ignoreFriends, this.wallBypass, this.critmode, this.correctionType, this.predict, this.predictStrength});
 this.autoPotion = autoPotion;
    }

    @Subscribe
 public void onInput(EventInput eventInput) {
if (this.inputTick > 0) {
eventInput.setForward(0.0F);
--this.inputTick;
        }

 this.handleSprinting(eventInput);
if ((Boolean)options.getValueByName("Коррекция движения").get() && this.correctionType.is("Свободный") && this.canWork) {
            MoveUtils.fixMovement(eventInput, rotateVector.x);
        }

    }

 private void handleSprinting(EventInput eventInput) {
        Minecraft mc = Minecraft.getInstance();
if (Minecraft.player != null && target != null) {
boolean shouldCancelSprint = this.shouldCancelSprint();
 if (shouldCancelSprint) {
eventInput.setSprintState(false);
 if (Minecraft.player.isSprinting()) {
Minecraft.player.setSprinting(false);
                }
            }
        }

    }

 private boolean shouldCancelSprint() {
if (target == null) {
 return false;
} else {
float[] ranges = this.getRanges();
            Minecraft var10000 = mc;
double distance = (double)Minecraft.player.getDistance(target);
if (this.sprintMode.is("Быстрый")) {
return distance <= (double)(ranges[0] + 1.0F);
} else {
return distance <= (double)(ranges[0] + 0.5F);
            }
        }
    }

 private float[] getRanges() {
return new float[]{(float)this.attackRange.getValue(), 1.0F};
    }

    @Subscribe
 public void onUpdate(EventUpdate e) {
if (this.canWork) {
if ((Boolean)options.getValueByName("Фокусировать одну цель").get() && (target == null || !this.isValidForNav(target, additionalNavRange())) || !(Boolean)options.getValueByName("Фокусировать одну цель").get()) {
 this.updateTarget();
            }

if (target != null) {
this.isRotated = false;
if (this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed()) {
this.ticks = 2;
this.tpAuraRule = true;
 this.updateAttack();
this.tpAuraRule = false;
                }

if (!this.isRotated) {
 this.setRotate();
                }
} else {
this.stopWatch.setLastMS(0L);
 this.reset();
            }
        }

    }

    @Subscribe
 private void onWalking(EventMotion e) {
if (target != null) {
            e.setYaw(rotateVector.x);
            e.setPitch(rotateVector.y);
            Minecraft.player.rotationYawHead = rotateVector.x;
Minecraft.player.renderYawOffset = this.calculateCorrectYawOffset2(rotateVector.x);
            Minecraft.player.rotationPitchHead = rotateVector.y;
        }

    }

 public void setRotate() {
if (this.type.is("SpookyTime")) {
 this.baseRotationSpookytime();
} else if (this.type.is("FunTime")) {
 this.funTimeRotation();
} else if (this.type.is("ReallyWorld")) {
 this.reallyWorldRotation();
} else if (this.type.is("HolyWorld")) {
 this.holyWorldRotation();
        }

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

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

    }

 private void funTimeRotation() {
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(1.1, 0.3, (double)target.getHeight()), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 0.5F), 180.0F);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 0.5F), 90.0F);
clampedPitch /= 0.425F;
clampedYaw /= 0.525F;
if (Math.abs(clampedYaw - this.lastYaw) <= 0.35F) {
clampedYaw = this.lastYaw + 0.45F;
        }

float randomFactor = (float)(Math.random() * 0.15 - 0.075);
float smoothYaw = MathHelper.lerp(0.3F, rotateVector.x, rotateVector.x + (yawDelta > 0.0F ? clampedYaw : -clampedYaw) + randomFactor);
float smoothPitch = MathHelper.lerp(0.3F, rotateVector.y, MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? clampedPitch : -clampedPitch) + randomFactor, -80.0F, 80.0F));
 float gcd = SensUtils.getGCDValue();
        smoothYaw -= (smoothYaw - rotateVector.x) % gcd;
        smoothPitch -= (smoothPitch - rotateVector.y) % gcd;
rotateVector = new Vector2f(smoothYaw, smoothPitch);
 this.lastYaw = clampedYaw;
 this.lastPitch = clampedPitch;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft.player.rotationYawOffset = smoothYaw;
        }

    }

 private void reallyWorldRotation() {
double heightOffset = (double)target.getHeight() * 0.9;
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(Minecraft.player.getPosYEye() - target.getPosY(), (double)0.0F, heightOffset), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
 float currentYaw = Minecraft.player.rotationYaw;
 float currentPitch = Minecraft.player.rotationPitch;
float targetYaw = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float targetPitch = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
targetPitch = MathHelper.clamp(targetPitch, -89.0F, 89.0F);
boolean attack = this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed();
 if (attack) {
 float yawDelta1 = MathHelper.wrapDegrees(targetYaw - rotateVector.x);
 float pitchDelta1 = MathHelper.wrapDegrees(targetPitch - rotateVector.y);
float baseSpeed = 95.0F;
float accelFactor = 3.5F;
float snapSpeed = baseSpeed * (1.0F + Math.min(Math.abs(yawDelta1) / 90.0F, 1.0F) * (accelFactor - 1.0F));
float snapFactor = Math.min(1.0F, snapSpeed / Math.max(1.0F, Math.abs(yawDelta1)));
 float snapYaw = rotateVector.x + yawDelta1 * snapFactor;
snapSpeed = baseSpeed * (1.0F + Math.min(Math.abs(pitchDelta1) / 90.0F, 1.0F) * (accelFactor - 1.0F));
snapFactor = Math.min(1.0F, snapSpeed / Math.max(1.0F, Math.abs(pitchDelta1)));
 float snapPitch = rotateVector.y + pitchDelta1 * snapFactor;
if (Math.abs(MathHelper.wrapDegrees(targetYaw - snapYaw)) < 0.1F) {
                snapYaw = targetYaw;
            }

if (Math.abs(MathHelper.wrapDegrees(targetPitch - snapPitch)) < 0.1F) {
                snapPitch = targetPitch;
            }

rotateVector = new Vector2f(snapYaw, snapPitch);
} else {
float returnSpeed = 80.0F;
 float yawDiff = MathHelper.wrapDegrees(currentYaw - rotateVector.x);
 float pitchDiff = MathHelper.wrapDegrees(currentPitch - rotateVector.y);
float returnFactor = Math.min(1.0F, returnSpeed / Math.max(1.0F, Math.abs(yawDiff)));
 float returnYaw = rotateVector.x + yawDiff * returnFactor;
returnFactor = Math.min(1.0F, returnSpeed / Math.max(1.0F, Math.abs(pitchDiff)));
 float returnPitch = rotateVector.y + pitchDiff * returnFactor;
rotateVector = new Vector2f(returnYaw, returnPitch);
        }

 this.lastYaw = rotateVector.x;
 this.lastPitch = rotateVector.y;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft.player.rotationYawOffset = rotateVector.x;
        }

    }

 private void holyWorldRotation() {
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(1.1, 0.3, (double)target.getHeight()), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float yawSpeed = Math.min(Math.max(Math.abs(yawDelta), 1.0F), 160.0F);
float pitchSpeed = Math.min(Math.max(Math.abs(pitchDelta), 1.0F), 70.0F);
float yaw = rotateVector.x + (yawDelta > 0.0F ? yawSpeed : -yawSpeed);
float pitch = MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? pitchSpeed : -pitchSpeed), -89.0F, 89.0F);
float twitchIntensity = 0.15F;
float twitchFrequency = 0.03F;
        Minecraft var10000 = mc;
if (Minecraft.player.ticksExisted % Math.max(1, (int)(twitchFrequency * 15.0F)) == 0) {
yaw += (float)(Math.random() - (double)0.5F) * twitchIntensity;
pitch += (float)(Math.random() - (double)0.5F) * twitchIntensity;
        }

yaw += (float)(Math.random() - (double)0.5F) * 0.03F;
pitch += (float)(Math.random() - (double)0.5F) * 0.03F;
 float gcd = SensUtils.getGCDValue();
float gcdRandomizer = (float)(Math.random() * (double)0.008F + (double)0.996F);
        yaw -= (yaw - rotateVector.x) % (gcd * gcdRandomizer);
        pitch -= (pitch - rotateVector.y) % (gcd * gcdRandomizer);
float maxYawChange = 40.0F;
float maxPitchChange = 35.0F;
        yaw = rotateVector.x + MathHelper.clamp(yaw - rotateVector.x, -maxYawChange, maxYawChange);
pitch = MathHelper.clamp(rotateVector.y + MathHelper.clamp(pitch - rotateVector.y, -maxPitchChange, maxPitchChange), -89.0F, 89.0F);
rotateVector = new Vector2f(yaw, pitch);
 this.lastYaw = yaw;
 this.lastPitch = pitch;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            var10000 = mc;
            Minecraft.player.rotationYawOffset = yaw;
        }

    }

private Vector3d getPredictedPosition(LivingEntity t, float strength) {
 float yaw = t.rotationYaw;
 float pitch = t.rotationPitch;
double yawRad = Math.toRadians((double)yaw);
double pitchRad = Math.toRadians((double)pitch);
 double x = -Math.sin(yawRad) * Math.cos(pitchRad);
 double y = -Math.sin(pitchRad);
 double z = Math.cos(yawRad) * Math.cos(pitchRad);
Vector3d lookVec = new Vector3d(x, y, z);
return t.getPositionVec().add(lookVec.scale((double)strength));
    }

 private void baseRotationSpookytime() {
Vector3d vec = (Boolean)this.predict.get() && target != null ? this.getPredictedPosition(target, (Float)this.predictStrength.get()) : target.getPositionVec();
        Minecraft var10002 = mc;
 double var28 = Minecraft.player.getPosYEye() - target.getPosY();
double var10004 = (double)target.getHeight();
        Minecraft var10006 = mc;
Vector3d var10000 = vec.add((double)0.0F, MathHelper.clamp(var28, (double)0.0F, var10004 - (double)1.0F * (Minecraft.player.getDistanceEyePos(target) / (double)this.attackDistance())), (double)0.0F);
        Minecraft var10001 = mc;
vec = var10000.subtract(Minecraft.player.getEyePosition(1.0F));
this.isRotated = true;
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 0.5F), 70.8F);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 0.0F), 12.3F);
float targetYaw = rotateVector.x + (yawDelta > 1.0F ? clampedYaw : -clampedYaw);
float targetPitch = rotateVector.y + (pitchDelta > 0.5F ? clampedPitch : -clampedPitch);
float lerpFactor = 0.687F;
 float yaw = rotateVector.x + (targetYaw - rotateVector.x) * lerpFactor;
 float pitch = rotateVector.y + (targetPitch - rotateVector.y) * lerpFactor;
float time = (float)(System.currentTimeMillis() % 10000L) / 720.0F;
float oscillationAmplitudeYaw = 7.8F;
float oscillationFrequencyYaw = 2.7F;
float yawOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyYaw) * oscillationAmplitudeYaw;
        yaw += yawOscillation;
float oscillationAmplitudePitch = 2.6F;
float oscillationFrequencyPitch = 2.9F;
float pitchOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyPitch) * oscillationAmplitudePitch;
        pitch += pitchOscillation;
pitch = MathHelper.clamp(pitch, -89.0F, 90.0F);
 float gcd = SensUtils.getGCDValue();
        yaw -= (yaw - rotateVector.x) % gcd;
        pitch -= (pitch - rotateVector.y) % gcd;
rotateVector = new Vector2f(yaw, pitch);
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft var27 = mc;
            Minecraft.player.rotationYawOffset = yaw;
        }

    }

 public float attackDistance() {
if ((Boolean)options.getValueByName("Оптимальная дистанция атаки").get()) {
            Minecraft var10000 = mc;
return !Minecraft.player.isSwimming() ? 3.6F : 3.0F;
} else {
return (Float)this.attackRange.get();
        }
    }

 float maxRange() {
float var10000 = this.attackDistance();
        Minecraft var10001 = mc;
return var10000 + (Minecraft.player.isElytraFlying() ? (Float)this.elytraRange.get() : 0.0F);
    }

 private static float additionalNavRange() {
return 7.0F;
    }

 private void updateTarget() {
List<LivingEntity> targetsList = new ArrayList();
 float navRange = additionalNavRange();
        Minecraft var10000 = mc;
        ObjectIterator var4 = Minecraft.world.getAllEntities().iterator();

 while(var4.hasNext()) {
            Entity entity = (Entity)var4.next();
if (entity instanceof LivingEntity living) {
if (this.isValidForNav(living, navRange)) {
                    targetsList.add(living);
                }
            }
        }

 if (targetsList.isEmpty()) {
target = null;
} else if (targetsList.size() == 1) {
target = (LivingEntity)targetsList.get(0);
} else {
targetsList.sort(Comparator.comparingDouble((entityx) -> this.entityMathUtil((Entity)entityx, (Boolean)this.consider.getValueByName("Хп").get(), (Boolean)this.consider.getValueByName("Броню").get(), (Boolean)this.consider.getValueByName("Дистанцию").get(), (double)this.maxRange(), (Boolean)this.consider.getValueByName("Баффы").get())).reversed());
target = (LivingEntity)targetsList.get(0);
        }

    }

private double entityMathUtil(Entity entity, boolean considerHp, boolean considerArmor, boolean considerDistance, double maxRange, boolean considerBuffs) {
double score = (double)0.0F;
if (entity instanceof LivingEntity living) {
 if (considerDistance) {
                Minecraft var10000 = mc;
double distance = (double)Minecraft.player.getDistance(entity);
double distanceScore = Math.max((double)0.0F, maxRange - distance);
score += distanceScore * (double)10.0F;
            }

 if (considerHp) {
double hp = (double)(living.getHealth() + living.getAbsorptionAmount());
double hpScore = Math.max((double)0.0F, (double)40.0F - hp);
score += hpScore * (double)2.0F;
            }

if (considerArmor && entity instanceof PlayerEntity) {
 int armor = ((PlayerEntity)entity).getTotalArmorValue();
double armorScore = (double)Math.max(0, 20 - armor);
score += armorScore * (double)1.5F;
            }
        }

 return score;
    }

private boolean isValidForNav(LivingEntity entity, float navRange) {
if (entity instanceof ClientPlayerEntity) {
 return false;
} else if (entity.ticksExisted < 3) {
 return false;
} else {
            Minecraft var10000 = mc;
if (Minecraft.player.getDistanceEyePos(entity) > (double)navRange) {
 return false;
} else {
if (entity instanceof PlayerEntity) {
                    PlayerEntity p = (PlayerEntity)entity;
 if (!entity.getUniqueID().equals(PlayerEntity.getOfflineUUID(p.getGameProfile().getName()))) {
 return false;
                    }

if ((Boolean)this.ignoreFriends.get() && FriendStorage.isFriend(p.getName().getString())) {
 return false;
                    }

                    String var4 = p.getName().getString();
                    Minecraft var10001 = mc;
 if (var4.equalsIgnoreCase(Minecraft.player.getName().getString())) {
 return false;
                    }
                }

if (entity instanceof PlayerEntity && !(Boolean)this.targets.getValueByName("Игроки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.getTotalArmorValue() == 0 && !(Boolean)this.targets.getValueByName("Голые").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.isInvisible() && entity.getTotalArmorValue() == 0 && !(Boolean)this.targets.getValueByName("Голые невидимки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.isInvisible() && !(Boolean)this.targets.getValueByName("Невидимки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && ((PlayerEntity)entity).isCreative()) {
 return false;
} else if (entity instanceof MonsterEntity && !(Boolean)this.targets.getValueByName("Мобы").get()) {
 return false;
} else if (entity instanceof AnimalEntity && !(Boolean)this.targets.getValueByName("Животные").get()) {
 return false;
} else {
return !entity.isInvulnerable() && entity.isAlive() && !(entity instanceof ArmorStandEntity);
                }
            }
        }
    }

 private boolean isPlayerEating() {
        Minecraft var10000 = mc;
 if (!Minecraft.player.isHandActive()) {
 return false;
} else {
            var10000 = mc;
            UseAction action = Minecraft.player.getActiveItemStack().getUseAction();
 return action == UseAction.EAT || action == UseAction.DRINK;
        }
    }

 private void updateAttack() {
this.selected = MouseUtil.getMouseOver(target, rotateVector.x, rotateVector.y, (double)this.attackDistance());
        Minecraft var10000 = mc;
if (!(Minecraft.player.getDistanceEyePos(target) > (double)this.attackDistance())) {
if ((Boolean)this.moreOptions.getValueByName("Проверка луча").get()) {
                var10000 = mc;
if (!Minecraft.player.isElytraFlying() && this.selected == null) {
 return;
                }
            }

if (!(Boolean)this.moreOptions.getValueByName("Бить через стены").get()) {
                var10000 = mc;
 if (!Minecraft.player.canEntityBeSeen(target)) {
 return;
                }
} else if ((Boolean)this.wallBypass.get()) {
                var10000 = mc;
 if (!Minecraft.player.canEntityBeSeen(target)) {
target.getPosition().add((double)this.randomUtil(-0.15F, 0.15F), target.getBoundingBox().getYSize(), (double)this.randomUtil(-0.15F, 0.15F));
                }
            }

if ((!(Boolean)this.moreOptions.getValueByName("Не бить если кушаешь").get() || !this.isPlayerEating()) && (!(Boolean)this.moreOptions.getValueByName("Не бить если в гуи").get() || mc.currentScreen == null || mc.currentScreen instanceof ChatScreen || mc.currentScreen instanceof IngameMenuScreen) && (!(Boolean)this.ignoreFriends.get() || !(target instanceof PlayerEntity) || !FriendStorage.isFriend(target.getName().getString()))) {
this.inputTick = 1;
                Minecraft var100001 = mc;
 if (Minecraft.player.serverSprintState) {
 return;
                }

this.stopWatch.setLastMS(500L);
                Minecraft var10001 = mc;
                var100001 = mc;
                Minecraft.playerController.attackEntity(Minecraft.player, target);
                var10000 = mc;
                Minecraft.player.swingArm(Hand.MAIN_HAND);
            }
        }

    }

private float randomUtil(float min, float max) {
return min + (max - min) * (new SecureRandom()).nextFloat();
    }

 public boolean shouldPlayerFalling() {
return this.isPlayerFalling(this.critmode.is("Только криты"), this.critmode.is("Умные криты"), (Boolean)options.getValueByName("Синхронизировать с TPS").get());
    }

private boolean isPlayerFalling(boolean onlyCrits, boolean smartCrits, boolean syncWithTPS) {
 if (!onlyCrits) {
 return true;
} else if (smartCrits) {
return !Minecraft.player.isOnGround() && Minecraft.player.fallDistance > 0.0F;
} else {
return !Minecraft.player.isOnGround() && Minecraft.player.fallDistance > 0.0F;
        }
    }

 private boolean isValid(LivingEntity entity) {
return this.isValidForNav(entity, this.maxRange());
    }

 private void reset() {
        Minecraft var10000 = mc;
Minecraft.player.rotationYawOffset = (float)Integer.MIN_VALUE;
        Minecraft var10003 = mc;
        Minecraft var10004 = mc;
rotateVector = new Vector2f(Minecraft.player.rotationYaw, Minecraft.player.rotationPitch);
    }

private float calculateCorrectYawOffset2(float yaw) {
 return yaw;
    }

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

 public boolean onDisable() {
 super.onDisable();
        Minecraft mc = Minecraft.getInstance();
if (Minecraft.player != null && Minecraft.player.isSprinting()) {
Minecraft.player.setSprinting(false);
        }

if (this.type.is("SpookyTime") && Minecraft.player != null) {
            Minecraft.player.rotationYaw = rotateVector.x;
            Minecraft.player.rotationPitch = rotateVector.y;
            Minecraft.player.rotationYawHead = rotateVector.x;
            Minecraft.player.renderYawOffset = rotateVector.x;
            Minecraft.player.rotationPitchHead = rotateVector.y;
        }

 this.reset();
this.stopWatch.setLastMS(0L);
target = null;
mc.timer.timerSpeed = 1.0F;
 return false;
    }

 public ModeSetting getType() {
 return this.type;
    }

 public ModeListSetting getOptions() {
 return options;
    }

 public ModeListSetting getMoreOptions() {
 return this.moreOptions;
    }

 public StopWatch getStopWatch() {
 return this.stopWatch;
    }

 public void setTarget(LivingEntity target) {
        KillAura.target = target;
    }

 private double getEntityArmor(PlayerEntity entityPlayer2) {
double d2 = (double)0.0F;

for(int i2 = 0; i2 < 4; ++i2) {
            ItemStack is = (ItemStack)entityPlayer2.inventory.armorInventory.get(i2);
if (is.getItem() instanceof ArmorItem) {
d2 += this.getProtectionLvl(is);
            }
        }

 return d2;
    }

 private double getProtectionLvl(ItemStack stack) {
        Item var3 = stack.getItem();
if (var3 instanceof ArmorItem i) {
double damageReduceAmount = (double)i.getDamageReduceAmount();
 if (stack.isEnchanted()) {
damageReduceAmount += (double)EnchantmentHelper.getEnchantmentLevel(Enchantments.PROTECTION, stack) * (double)0.25F;
            }

 return damageReduceAmount;
} else {
return (double)0.0F;
        }
    }

 private double getEntityHealth(LivingEntity ent) {
if (ent instanceof PlayerEntity player) {
return (double)(player.getHealth() + player.getAbsorptionAmount()) * (this.getEntityArmor(player) / (double)20.0F);
} else {
return (double)(ent.getHealth() + ent.getAbsorptionAmount());
        }
    }

 public static LivingEntity getTarget() {
 return target;
    }
}
Харош братан
 
Сливаю килку титаниум клиента (этот клиент кидал и кидает ратки)
Не советую использовать это чудище чата гпт, думаю что ничего не обходит
а так же у него есть похожие говно пасты клиенты под говно сервера
по коду чекнул, там дебуда 1 в 1
Java:
Expand Collapse Copy
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package dev.akven.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import dev.akven.command.friends.FriendStorage;
import dev.akven.events.EventInput;
import dev.akven.events.EventMotion;
import dev.akven.events.EventUpdate;
import dev.akven.functions.api.Category;
import dev.akven.functions.api.Function;
import dev.akven.functions.api.FunctionRegister;
import dev.akven.functions.settings.Setting;
import dev.akven.functions.settings.impl.BooleanSetting;
import dev.akven.functions.settings.impl.ModeListSetting;
import dev.akven.functions.settings.impl.ModeSetting;
import dev.akven.functions.settings.impl.SliderSetting;
import dev.akven.utils.math.SensUtils;
import dev.akven.utils.math.StopWatch;
import dev.akven.utils.player.MouseUtil;
import dev.akven.utils.player.MoveUtils;
import it.unimi.dsi.fastutil.objects.ObjectIterator;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.IngameMenuScreen;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.item.ArmorStandEntity;
import net.minecraft.entity.monster.MonsterEntity;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.UseAction;
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;

@FunctionRegister(
name = "Aura",
    type = Category.Combat
)
public class KillAura extends Function {
private final ModeSetting type = new ModeSetting("Режим ротации", "SpookyTime", new String[]{"SpookyTime", "FunTime", "ReallyWorld", "HolyWorld"});
private final SliderSetting attackRange = new SliderSetting("Дистанция аттаки", 3.0F, 2.5F, 12.0F, 0.05F);
private final SliderSetting elytraRange = new SliderSetting("Дистанция на элитре", 6.0F, 0.0F, 16.0F, 0.05F);
private final BooleanSetting predict = new BooleanSetting("Предикт", false);
private final SliderSetting predictStrength = (new SliderSetting("Сила предикта", 0.2F, 0.1F, 0.3F, 0.05F)).setVisible(() -> (Boolean)this.predict.get());
final ModeListSetting targets = new ModeListSetting("Таргеты", new BooleanSetting[]{new BooleanSetting("Игроки", true), new BooleanSetting("Голые", true), new BooleanSetting("Мобы", false), new BooleanSetting("Животные", false), new BooleanSetting("Голые невидимки", true), new BooleanSetting("Невидимки", true)});
final ModeListSetting consider = new ModeListSetting("Учитывать", new BooleanSetting[]{new BooleanSetting("Хп", true), new BooleanSetting("Броню", true), new BooleanSetting("Дистанцию", true), new BooleanSetting("Баффы", true)});
public static ModeListSetting options = new ModeListSetting("Опции", new BooleanSetting[]{new BooleanSetting("Только криты", true), new BooleanSetting("Синхронизировать с TPS", false), new BooleanSetting("Фокусировать одну цель", true), new BooleanSetting("Коррекция движения", true), new BooleanSetting("Оптимальная дистанция атаки", false), new BooleanSetting("Резольвер", false)});
final ModeListSetting moreOptions = new ModeListSetting("Триггеры", new BooleanSetting[]{new BooleanSetting("Проверка луча", true), new BooleanSetting("Бить через стены", true), new BooleanSetting("Не бить если кушаешь", true), new BooleanSetting("Не бить если в гуи", true)});
private final ModeSetting sprintMode = new ModeSetting("Режим спринта", "Легитный", new String[]{"Легитный", "Быстрый"});
private final BooleanSetting ignoreFriends = new BooleanSetting("Не бить друзей", true);
private final BooleanSetting wallBypass = (new BooleanSetting("Обход Через Стены", true)).setVisible(() -> (Boolean)this.moreOptions.getValueByName("Бить через стены").get());
private final ModeSetting critmode = new ModeSetting("Тип критов", "Только криты", new String[]{"Только криты", "Умные криты"});
private final ModeSetting correctionType = (new ModeSetting("Тип коррекции", "Свободный", new String[]{"Свободный", "Сфокусированный"})).setVisible(() -> (Boolean)options.getValueByName("Коррекция движения").get());
private final StopWatch stopWatch = new StopWatch();
public static Vector2f rotateVector = new Vector2f(0.0F, 0.0F);
 public static LivingEntity target;
private boolean sprintReset = false;
 private Entity selected;
int ticks = 0;
int inputTick = 0;
boolean isRotated = false;
boolean canWork = true;
boolean tpAuraRule = false;
 final AutoPotion autoPotion;
 float lastYaw;
 float lastPitch;

 public KillAura(AutoPotion autoPotion) {
this.addSettings(new Setting[]{this.type, this.attackRange, this.elytraRange, this.targets, this.consider, options, this.moreOptions, this.sprintMode, this.ignoreFriends, this.wallBypass, this.critmode, this.correctionType, this.predict, this.predictStrength});
 this.autoPotion = autoPotion;
    }

    @Subscribe
 public void onInput(EventInput eventInput) {
if (this.inputTick > 0) {
eventInput.setForward(0.0F);
--this.inputTick;
        }

 this.handleSprinting(eventInput);
if ((Boolean)options.getValueByName("Коррекция движения").get() && this.correctionType.is("Свободный") && this.canWork) {
            MoveUtils.fixMovement(eventInput, rotateVector.x);
        }

    }

 private void handleSprinting(EventInput eventInput) {
        Minecraft mc = Minecraft.getInstance();
if (Minecraft.player != null && target != null) {
boolean shouldCancelSprint = this.shouldCancelSprint();
 if (shouldCancelSprint) {
eventInput.setSprintState(false);
 if (Minecraft.player.isSprinting()) {
Minecraft.player.setSprinting(false);
                }
            }
        }

    }

 private boolean shouldCancelSprint() {
if (target == null) {
 return false;
} else {
float[] ranges = this.getRanges();
            Minecraft var10000 = mc;
double distance = (double)Minecraft.player.getDistance(target);
if (this.sprintMode.is("Быстрый")) {
return distance <= (double)(ranges[0] + 1.0F);
} else {
return distance <= (double)(ranges[0] + 0.5F);
            }
        }
    }

 private float[] getRanges() {
return new float[]{(float)this.attackRange.getValue(), 1.0F};
    }

    @Subscribe
 public void onUpdate(EventUpdate e) {
if (this.canWork) {
if ((Boolean)options.getValueByName("Фокусировать одну цель").get() && (target == null || !this.isValidForNav(target, additionalNavRange())) || !(Boolean)options.getValueByName("Фокусировать одну цель").get()) {
 this.updateTarget();
            }

if (target != null) {
this.isRotated = false;
if (this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed()) {
this.ticks = 2;
this.tpAuraRule = true;
 this.updateAttack();
this.tpAuraRule = false;
                }

if (!this.isRotated) {
 this.setRotate();
                }
} else {
this.stopWatch.setLastMS(0L);
 this.reset();
            }
        }

    }

    @Subscribe
 private void onWalking(EventMotion e) {
if (target != null) {
            e.setYaw(rotateVector.x);
            e.setPitch(rotateVector.y);
            Minecraft.player.rotationYawHead = rotateVector.x;
Minecraft.player.renderYawOffset = this.calculateCorrectYawOffset2(rotateVector.x);
            Minecraft.player.rotationPitchHead = rotateVector.y;
        }

    }

 public void setRotate() {
if (this.type.is("SpookyTime")) {
 this.baseRotationSpookytime();
} else if (this.type.is("FunTime")) {
 this.funTimeRotation();
} else if (this.type.is("ReallyWorld")) {
 this.reallyWorldRotation();
} else if (this.type.is("HolyWorld")) {
 this.holyWorldRotation();
        }

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

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

    }

 private void funTimeRotation() {
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(1.1, 0.3, (double)target.getHeight()), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 0.5F), 180.0F);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 0.5F), 90.0F);
clampedPitch /= 0.425F;
clampedYaw /= 0.525F;
if (Math.abs(clampedYaw - this.lastYaw) <= 0.35F) {
clampedYaw = this.lastYaw + 0.45F;
        }

float randomFactor = (float)(Math.random() * 0.15 - 0.075);
float smoothYaw = MathHelper.lerp(0.3F, rotateVector.x, rotateVector.x + (yawDelta > 0.0F ? clampedYaw : -clampedYaw) + randomFactor);
float smoothPitch = MathHelper.lerp(0.3F, rotateVector.y, MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? clampedPitch : -clampedPitch) + randomFactor, -80.0F, 80.0F));
 float gcd = SensUtils.getGCDValue();
        smoothYaw -= (smoothYaw - rotateVector.x) % gcd;
        smoothPitch -= (smoothPitch - rotateVector.y) % gcd;
rotateVector = new Vector2f(smoothYaw, smoothPitch);
 this.lastYaw = clampedYaw;
 this.lastPitch = clampedPitch;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft.player.rotationYawOffset = smoothYaw;
        }

    }

 private void reallyWorldRotation() {
double heightOffset = (double)target.getHeight() * 0.9;
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(Minecraft.player.getPosYEye() - target.getPosY(), (double)0.0F, heightOffset), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
 float currentYaw = Minecraft.player.rotationYaw;
 float currentPitch = Minecraft.player.rotationPitch;
float targetYaw = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float targetPitch = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
targetPitch = MathHelper.clamp(targetPitch, -89.0F, 89.0F);
boolean attack = this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed();
 if (attack) {
 float yawDelta1 = MathHelper.wrapDegrees(targetYaw - rotateVector.x);
 float pitchDelta1 = MathHelper.wrapDegrees(targetPitch - rotateVector.y);
float baseSpeed = 95.0F;
float accelFactor = 3.5F;
float snapSpeed = baseSpeed * (1.0F + Math.min(Math.abs(yawDelta1) / 90.0F, 1.0F) * (accelFactor - 1.0F));
float snapFactor = Math.min(1.0F, snapSpeed / Math.max(1.0F, Math.abs(yawDelta1)));
 float snapYaw = rotateVector.x + yawDelta1 * snapFactor;
snapSpeed = baseSpeed * (1.0F + Math.min(Math.abs(pitchDelta1) / 90.0F, 1.0F) * (accelFactor - 1.0F));
snapFactor = Math.min(1.0F, snapSpeed / Math.max(1.0F, Math.abs(pitchDelta1)));
 float snapPitch = rotateVector.y + pitchDelta1 * snapFactor;
if (Math.abs(MathHelper.wrapDegrees(targetYaw - snapYaw)) < 0.1F) {
                snapYaw = targetYaw;
            }

if (Math.abs(MathHelper.wrapDegrees(targetPitch - snapPitch)) < 0.1F) {
                snapPitch = targetPitch;
            }

rotateVector = new Vector2f(snapYaw, snapPitch);
} else {
float returnSpeed = 80.0F;
 float yawDiff = MathHelper.wrapDegrees(currentYaw - rotateVector.x);
 float pitchDiff = MathHelper.wrapDegrees(currentPitch - rotateVector.y);
float returnFactor = Math.min(1.0F, returnSpeed / Math.max(1.0F, Math.abs(yawDiff)));
 float returnYaw = rotateVector.x + yawDiff * returnFactor;
returnFactor = Math.min(1.0F, returnSpeed / Math.max(1.0F, Math.abs(pitchDiff)));
 float returnPitch = rotateVector.y + pitchDiff * returnFactor;
rotateVector = new Vector2f(returnYaw, returnPitch);
        }

 this.lastYaw = rotateVector.x;
 this.lastPitch = rotateVector.y;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft.player.rotationYawOffset = rotateVector.x;
        }

    }

 private void holyWorldRotation() {
Vector3d vec = target.getPositionVec().add((double)0.0F, MathHelper.clamp(1.1, 0.3, (double)target.getHeight()), (double)0.0F).subtract(Minecraft.player.getEyePosition(1.0F));
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float yawSpeed = Math.min(Math.max(Math.abs(yawDelta), 1.0F), 160.0F);
float pitchSpeed = Math.min(Math.max(Math.abs(pitchDelta), 1.0F), 70.0F);
float yaw = rotateVector.x + (yawDelta > 0.0F ? yawSpeed : -yawSpeed);
float pitch = MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? pitchSpeed : -pitchSpeed), -89.0F, 89.0F);
float twitchIntensity = 0.15F;
float twitchFrequency = 0.03F;
        Minecraft var10000 = mc;
if (Minecraft.player.ticksExisted % Math.max(1, (int)(twitchFrequency * 15.0F)) == 0) {
yaw += (float)(Math.random() - (double)0.5F) * twitchIntensity;
pitch += (float)(Math.random() - (double)0.5F) * twitchIntensity;
        }

yaw += (float)(Math.random() - (double)0.5F) * 0.03F;
pitch += (float)(Math.random() - (double)0.5F) * 0.03F;
 float gcd = SensUtils.getGCDValue();
float gcdRandomizer = (float)(Math.random() * (double)0.008F + (double)0.996F);
        yaw -= (yaw - rotateVector.x) % (gcd * gcdRandomizer);
        pitch -= (pitch - rotateVector.y) % (gcd * gcdRandomizer);
float maxYawChange = 40.0F;
float maxPitchChange = 35.0F;
        yaw = rotateVector.x + MathHelper.clamp(yaw - rotateVector.x, -maxYawChange, maxYawChange);
pitch = MathHelper.clamp(rotateVector.y + MathHelper.clamp(pitch - rotateVector.y, -maxPitchChange, maxPitchChange), -89.0F, 89.0F);
rotateVector = new Vector2f(yaw, pitch);
 this.lastYaw = yaw;
 this.lastPitch = pitch;
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            var10000 = mc;
            Minecraft.player.rotationYawOffset = yaw;
        }

    }

private Vector3d getPredictedPosition(LivingEntity t, float strength) {
 float yaw = t.rotationYaw;
 float pitch = t.rotationPitch;
double yawRad = Math.toRadians((double)yaw);
double pitchRad = Math.toRadians((double)pitch);
 double x = -Math.sin(yawRad) * Math.cos(pitchRad);
 double y = -Math.sin(pitchRad);
 double z = Math.cos(yawRad) * Math.cos(pitchRad);
Vector3d lookVec = new Vector3d(x, y, z);
return t.getPositionVec().add(lookVec.scale((double)strength));
    }

 private void baseRotationSpookytime() {
Vector3d vec = (Boolean)this.predict.get() && target != null ? this.getPredictedPosition(target, (Float)this.predictStrength.get()) : target.getPositionVec();
        Minecraft var10002 = mc;
 double var28 = Minecraft.player.getPosYEye() - target.getPosY();
double var10004 = (double)target.getHeight();
        Minecraft var10006 = mc;
Vector3d var10000 = vec.add((double)0.0F, MathHelper.clamp(var28, (double)0.0F, var10004 - (double)1.0F * (Minecraft.player.getDistanceEyePos(target) / (double)this.attackDistance())), (double)0.0F);
        Minecraft var10001 = mc;
vec = var10000.subtract(Minecraft.player.getEyePosition(1.0F));
this.isRotated = true;
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - (double)90.0F);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
 float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
 float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 0.5F), 70.8F);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 0.0F), 12.3F);
float targetYaw = rotateVector.x + (yawDelta > 1.0F ? clampedYaw : -clampedYaw);
float targetPitch = rotateVector.y + (pitchDelta > 0.5F ? clampedPitch : -clampedPitch);
float lerpFactor = 0.687F;
 float yaw = rotateVector.x + (targetYaw - rotateVector.x) * lerpFactor;
 float pitch = rotateVector.y + (targetPitch - rotateVector.y) * lerpFactor;
float time = (float)(System.currentTimeMillis() % 10000L) / 720.0F;
float oscillationAmplitudeYaw = 7.8F;
float oscillationFrequencyYaw = 2.7F;
float yawOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyYaw) * oscillationAmplitudeYaw;
        yaw += yawOscillation;
float oscillationAmplitudePitch = 2.6F;
float oscillationFrequencyPitch = 2.9F;
float pitchOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyPitch) * oscillationAmplitudePitch;
        pitch += pitchOscillation;
pitch = MathHelper.clamp(pitch, -89.0F, 90.0F);
 float gcd = SensUtils.getGCDValue();
        yaw -= (yaw - rotateVector.x) % gcd;
        pitch -= (pitch - rotateVector.y) % gcd;
rotateVector = new Vector2f(yaw, pitch);
if ((Boolean)options.getValueByName("Коррекция движения").get()) {
            Minecraft var27 = mc;
            Minecraft.player.rotationYawOffset = yaw;
        }

    }

 public float attackDistance() {
if ((Boolean)options.getValueByName("Оптимальная дистанция атаки").get()) {
            Minecraft var10000 = mc;
return !Minecraft.player.isSwimming() ? 3.6F : 3.0F;
} else {
return (Float)this.attackRange.get();
        }
    }

 float maxRange() {
float var10000 = this.attackDistance();
        Minecraft var10001 = mc;
return var10000 + (Minecraft.player.isElytraFlying() ? (Float)this.elytraRange.get() : 0.0F);
    }

 private static float additionalNavRange() {
return 7.0F;
    }

 private void updateTarget() {
List<LivingEntity> targetsList = new ArrayList();
 float navRange = additionalNavRange();
        Minecraft var10000 = mc;
        ObjectIterator var4 = Minecraft.world.getAllEntities().iterator();

 while(var4.hasNext()) {
            Entity entity = (Entity)var4.next();
if (entity instanceof LivingEntity living) {
if (this.isValidForNav(living, navRange)) {
                    targetsList.add(living);
                }
            }
        }

 if (targetsList.isEmpty()) {
target = null;
} else if (targetsList.size() == 1) {
target = (LivingEntity)targetsList.get(0);
} else {
targetsList.sort(Comparator.comparingDouble((entityx) -> this.entityMathUtil((Entity)entityx, (Boolean)this.consider.getValueByName("Хп").get(), (Boolean)this.consider.getValueByName("Броню").get(), (Boolean)this.consider.getValueByName("Дистанцию").get(), (double)this.maxRange(), (Boolean)this.consider.getValueByName("Баффы").get())).reversed());
target = (LivingEntity)targetsList.get(0);
        }

    }

private double entityMathUtil(Entity entity, boolean considerHp, boolean considerArmor, boolean considerDistance, double maxRange, boolean considerBuffs) {
double score = (double)0.0F;
if (entity instanceof LivingEntity living) {
 if (considerDistance) {
                Minecraft var10000 = mc;
double distance = (double)Minecraft.player.getDistance(entity);
double distanceScore = Math.max((double)0.0F, maxRange - distance);
score += distanceScore * (double)10.0F;
            }

 if (considerHp) {
double hp = (double)(living.getHealth() + living.getAbsorptionAmount());
double hpScore = Math.max((double)0.0F, (double)40.0F - hp);
score += hpScore * (double)2.0F;
            }

if (considerArmor && entity instanceof PlayerEntity) {
 int armor = ((PlayerEntity)entity).getTotalArmorValue();
double armorScore = (double)Math.max(0, 20 - armor);
score += armorScore * (double)1.5F;
            }
        }

 return score;
    }

private boolean isValidForNav(LivingEntity entity, float navRange) {
if (entity instanceof ClientPlayerEntity) {
 return false;
} else if (entity.ticksExisted < 3) {
 return false;
} else {
            Minecraft var10000 = mc;
if (Minecraft.player.getDistanceEyePos(entity) > (double)navRange) {
 return false;
} else {
if (entity instanceof PlayerEntity) {
                    PlayerEntity p = (PlayerEntity)entity;
 if (!entity.getUniqueID().equals(PlayerEntity.getOfflineUUID(p.getGameProfile().getName()))) {
 return false;
                    }

if ((Boolean)this.ignoreFriends.get() && FriendStorage.isFriend(p.getName().getString())) {
 return false;
                    }

                    String var4 = p.getName().getString();
                    Minecraft var10001 = mc;
 if (var4.equalsIgnoreCase(Minecraft.player.getName().getString())) {
 return false;
                    }
                }

if (entity instanceof PlayerEntity && !(Boolean)this.targets.getValueByName("Игроки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.getTotalArmorValue() == 0 && !(Boolean)this.targets.getValueByName("Голые").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.isInvisible() && entity.getTotalArmorValue() == 0 && !(Boolean)this.targets.getValueByName("Голые невидимки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && entity.isInvisible() && !(Boolean)this.targets.getValueByName("Невидимки").get()) {
 return false;
} else if (entity instanceof PlayerEntity && ((PlayerEntity)entity).isCreative()) {
 return false;
} else if (entity instanceof MonsterEntity && !(Boolean)this.targets.getValueByName("Мобы").get()) {
 return false;
} else if (entity instanceof AnimalEntity && !(Boolean)this.targets.getValueByName("Животные").get()) {
 return false;
} else {
return !entity.isInvulnerable() && entity.isAlive() && !(entity instanceof ArmorStandEntity);
                }
            }
        }
    }

 private boolean isPlayerEating() {
        Minecraft var10000 = mc;
 if (!Minecraft.player.isHandActive()) {
 return false;
} else {
            var10000 = mc;
            UseAction action = Minecraft.player.getActiveItemStack().getUseAction();
 return action == UseAction.EAT || action == UseAction.DRINK;
        }
    }

 private void updateAttack() {
this.selected = MouseUtil.getMouseOver(target, rotateVector.x, rotateVector.y, (double)this.attackDistance());
        Minecraft var10000 = mc;
if (!(Minecraft.player.getDistanceEyePos(target) > (double)this.attackDistance())) {
if ((Boolean)this.moreOptions.getValueByName("Проверка луча").get()) {
                var10000 = mc;
if (!Minecraft.player.isElytraFlying() && this.selected == null) {
 return;
                }
            }

if (!(Boolean)this.moreOptions.getValueByName("Бить через стены").get()) {
                var10000 = mc;
 if (!Minecraft.player.canEntityBeSeen(target)) {
 return;
                }
} else if ((Boolean)this.wallBypass.get()) {
                var10000 = mc;
 if (!Minecraft.player.canEntityBeSeen(target)) {
target.getPosition().add((double)this.randomUtil(-0.15F, 0.15F), target.getBoundingBox().getYSize(), (double)this.randomUtil(-0.15F, 0.15F));
                }
            }

if ((!(Boolean)this.moreOptions.getValueByName("Не бить если кушаешь").get() || !this.isPlayerEating()) && (!(Boolean)this.moreOptions.getValueByName("Не бить если в гуи").get() || mc.currentScreen == null || mc.currentScreen instanceof ChatScreen || mc.currentScreen instanceof IngameMenuScreen) && (!(Boolean)this.ignoreFriends.get() || !(target instanceof PlayerEntity) || !FriendStorage.isFriend(target.getName().getString()))) {
this.inputTick = 1;
                Minecraft var100001 = mc;
 if (Minecraft.player.serverSprintState) {
 return;
                }

this.stopWatch.setLastMS(500L);
                Minecraft var10001 = mc;
                var100001 = mc;
                Minecraft.playerController.attackEntity(Minecraft.player, target);
                var10000 = mc;
                Minecraft.player.swingArm(Hand.MAIN_HAND);
            }
        }

    }

private float randomUtil(float min, float max) {
return min + (max - min) * (new SecureRandom()).nextFloat();
    }

 public boolean shouldPlayerFalling() {
return this.isPlayerFalling(this.critmode.is("Только криты"), this.critmode.is("Умные криты"), (Boolean)options.getValueByName("Синхронизировать с TPS").get());
    }

private boolean isPlayerFalling(boolean onlyCrits, boolean smartCrits, boolean syncWithTPS) {
 if (!onlyCrits) {
 return true;
} else if (smartCrits) {
return !Minecraft.player.isOnGround() && Minecraft.player.fallDistance > 0.0F;
} else {
return !Minecraft.player.isOnGround() && Minecraft.player.fallDistance > 0.0F;
        }
    }

 private boolean isValid(LivingEntity entity) {
return this.isValidForNav(entity, this.maxRange());
    }

 private void reset() {
        Minecraft var10000 = mc;
Minecraft.player.rotationYawOffset = (float)Integer.MIN_VALUE;
        Minecraft var10003 = mc;
        Minecraft var10004 = mc;
rotateVector = new Vector2f(Minecraft.player.rotationYaw, Minecraft.player.rotationPitch);
    }

private float calculateCorrectYawOffset2(float yaw) {
 return yaw;
    }

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

 public boolean onDisable() {
 super.onDisable();
        Minecraft mc = Minecraft.getInstance();
if (Minecraft.player != null && Minecraft.player.isSprinting()) {
Minecraft.player.setSprinting(false);
        }

if (this.type.is("SpookyTime") && Minecraft.player != null) {
            Minecraft.player.rotationYaw = rotateVector.x;
            Minecraft.player.rotationPitch = rotateVector.y;
            Minecraft.player.rotationYawHead = rotateVector.x;
            Minecraft.player.renderYawOffset = rotateVector.x;
            Minecraft.player.rotationPitchHead = rotateVector.y;
        }

 this.reset();
this.stopWatch.setLastMS(0L);
target = null;
mc.timer.timerSpeed = 1.0F;
 return false;
    }

 public ModeSetting getType() {
 return this.type;
    }

 public ModeListSetting getOptions() {
 return options;
    }

 public ModeListSetting getMoreOptions() {
 return this.moreOptions;
    }

 public StopWatch getStopWatch() {
 return this.stopWatch;
    }

 public void setTarget(LivingEntity target) {
        KillAura.target = target;
    }

 private double getEntityArmor(PlayerEntity entityPlayer2) {
double d2 = (double)0.0F;

for(int i2 = 0; i2 < 4; ++i2) {
            ItemStack is = (ItemStack)entityPlayer2.inventory.armorInventory.get(i2);
if (is.getItem() instanceof ArmorItem) {
d2 += this.getProtectionLvl(is);
            }
        }

 return d2;
    }

 private double getProtectionLvl(ItemStack stack) {
        Item var3 = stack.getItem();
if (var3 instanceof ArmorItem i) {
double damageReduceAmount = (double)i.getDamageReduceAmount();
 if (stack.isEnchanted()) {
damageReduceAmount += (double)EnchantmentHelper.getEnchantmentLevel(Enchantments.PROTECTION, stack) * (double)0.25F;
            }

 return damageReduceAmount;
} else {
return (double)0.0F;
        }
    }

 private double getEntityHealth(LivingEntity ent) {
if (ent instanceof PlayerEntity player) {
return (double)(player.getHealth() + player.getAbsorptionAmount()) * (this.getEntityArmor(player) / (double)20.0F);
} else {
return (double)(ent.getHealth() + ent.getAbsorptionAmount());
        }
    }

 public static LivingEntity getTarget() {
 return target;
    }
}
спуки обходит?
 
1768544311607.png
 
держи мабой фиксанутые
в чем проблема самому пофиксить
дайте ahhelper для 3.1 плиз
Код:
Expand Collapse Copy
// fix by zalupo3001
package im.expensive.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.expensive.command.friends.FriendStorage;
import im.expensive.events.EventInput;
import im.expensive.events.EventMotion;
import im.expensive.events.EventUpdate;
import im.expensive.functions.api.Category;
import im.expensive.functions.api.Function;
import im.expensive.functions.api.FunctionRegister;
import im.expensive.functions.settings.impl.BooleanSetting;
import im.expensive.functions.settings.impl.ModeListSetting;
import im.expensive.functions.settings.impl.ModeSetting;
import im.expensive.functions.settings.impl.SliderSetting;
import im.expensive.utils.math.SensUtils;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.player.MouseUtil;
import im.expensive.utils.player.MoveUtils;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.IngameMenuScreen;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.item.ArmorStandEntity;
import net.minecraft.entity.monster.MonsterEntity;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.UseAction;
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.security.SecureRandom;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;

@FunctionRegister(name = "Aura", type = Category.Combat)
public class Aura extends Function {
    private final ModeSetting type = new ModeSetting("Режим ротации", "SpookyTime", "SpookyTime", "FunTime", "ReallyWorld", "HolyWorld");
    private final SliderSetting attackRange = new SliderSetting("Дистанция аттаки", 3.0F, 2.5F, 12.0F, 0.05F);
    private final SliderSetting elytraRange = new SliderSetting("Дистанция на элитре", 6.0F, 0.0F, 16.0F, 0.05F);
    private final BooleanSetting predict = new BooleanSetting("Предикт", false);
    private final SliderSetting predictStrength = (new SliderSetting("Сила предикта", 0.2F, 0.1F, 0.3F, 0.05F)).setVisible(() -> predict.get());

    final ModeListSetting targets = new ModeListSetting("Таргеты",
            new BooleanSetting("Игроки", true),
            new BooleanSetting("Голые", true),
            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));

    public static ModeListSetting options = new ModeListSetting("Опции",
            new BooleanSetting("Только криты", true),
            new BooleanSetting("Синхронизировать с TPS", false),
            new BooleanSetting("Фокусировать одну цель", true),
            new BooleanSetting("Коррекция движения", true),
            new BooleanSetting("Оптимальная дистанция атаки", false),
            new BooleanSetting("Резольвер", false));

    final ModeListSetting moreOptions = new ModeListSetting("Триггеры",
            new BooleanSetting("Проверка луча", true),
            new BooleanSetting("Бить через стены", true),
            new BooleanSetting("Не бить если кушаешь", true),
            new BooleanSetting("Не бить если в гуи", true));

    private final ModeSetting sprintMode = new ModeSetting("Режим спринта", "Легитный", "Легитный", "Быстрый");
    private final BooleanSetting ignoreFriends = new BooleanSetting("Не бить друзей", true);
    private final BooleanSetting wallBypass = (new BooleanSetting("Обход Через Стены", true)).setVisible(() -> moreOptions.getValueByName("Бить через стены").get());
    private final ModeSetting critmode = new ModeSetting("Тип критов", "Только криты", "Только криты", "Умные криты");
    private final ModeSetting correctionType = (new ModeSetting("Тип коррекции", "Свободный", "Свободный", "Сфокусированный")).setVisible(() -> options.getValueByName("Коррекция движения").get());

    private final StopWatch stopWatch = new StopWatch();
    public static Vector2f rotateVector = new Vector2f(0.0F, 0.0F);
    public static LivingEntity target;
    private boolean sprintReset = false;
    private Entity selected;
    int ticks = 0;
    int inputTick = 0;
    boolean isRotated = false;
    boolean canWork = true;
    boolean tpAuraRule = false;
    // final AutoPotion autoPotion; // Убрал, так как в конструкторе он не используется, а создает лишнюю зависимость

    float lastYaw;
    float lastPitch;

    public Aura() {
        this.addSettings(this.type, this.attackRange, this.elytraRange, this.targets, this.consider, options, this.moreOptions, this.sprintMode, this.ignoreFriends, this.wallBypass, this.critmode, this.correctionType, this.predict, this.predictStrength);
    }

    @Subscribe
    public void onInput(EventInput eventInput) {
        if (this.inputTick > 0) {
            // Исправлено: предполагаем публичные поля, так как сеттеров нет
            eventInput.setForward(0.0f);
            --this.inputTick;
        }

        this.handleSprinting(eventInput);
        if (options.getValueByName("Коррекция движения").get() && this.correctionType.is("Свободный") && this.canWork) {
            MoveUtils.fixMovement(eventInput, rotateVector.x);
        }
    }

    private void handleSprinting(EventInput eventInput) {
        if (mc.player != null && target != null) {
            boolean shouldCancelSprint = this.shouldCancelSprint();
            if (shouldCancelSprint) {
                mc.gameSettings.keyBindSprint.pressed = false;
                mc.player.setSprinting(false);
            }
        }
    }

    private boolean shouldCancelSprint() {
        if (target == null) {
            return false;
        } else {
            float[] ranges = this.getRanges();
            double distance = mc.player.getDistance(target);
            if (this.sprintMode.is("Быстрый")) {
                return distance <= (double)(ranges[0] + 1.0F);
            } else {
                return distance <= (double)(ranges[0] + 0.5F);
            }
        }
    }

    private float[] getRanges() {
        return new float[]{this.attackRange.get(), 1.0F};
    }

    @Subscribe
    public void onUpdate(EventUpdate e) {
        if (this.canWork) {
            if (options.getValueByName("Фокусировать одну цель").get() && (target == null || !this.isValidForNav(target, additionalNavRange())) || !options.getValueByName("Фокусировать одну цель").get()) {
                this.updateTarget();
            }

            if (target != null) {
                this.isRotated = false;
                if (this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed()) {
                    this.ticks = 2;
                    this.tpAuraRule = true;
                    this.updateAttack();
                    this.tpAuraRule = false;
                }

                if (!this.isRotated) {
                    this.setRotate();
                }
            } else {
                this.stopWatch.setLastMS(0L);
                this.reset();
            }
        }
    }

    @Subscribe
    private void onWalking(EventMotion e) {
        if (target != null) {
            // ИСПРАВЛЕНИЕ: Если методов setYaw/setPitch нет, используем прямые поля
            e.setYaw(rotateVector.x);
            e.setPitch(rotateVector.y);

            mc.player.rotationYawHead = rotateVector.x;
            mc.player.renderYawOffset = this.calculateCorrectYawOffset2(rotateVector.x);
            mc.player.rotationPitchHead = rotateVector.y;
        }
    }

    public void setRotate() {
        if (this.type.is("SpookyTime")) {
            this.baseRotationSpookytime();
        } else if (this.type.is("FunTime")) {
            this.funTimeRotation();
        } else if (this.type.is("ReallyWorld")) {
            this.reallyWorldRotation();
        } else if (this.type.is("HolyWorld")) {
            this.holyWorldRotation();
        }

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

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

    private void funTimeRotation() {
        Vector3d vec = target.getPositionVec().add(0.0F, MathHelper.clamp(1.1, 0.3, target.getHeight()), 0.0F).subtract(mc.player.getEyePosition(1.0F));
        float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0F);
        float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
        float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
        float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
        float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 0.5F), 180.0F);
        float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 0.5F), 90.0F);
        clampedPitch /= 0.425F;
        clampedYaw /= 0.525F;
        if (Math.abs(clampedYaw - this.lastYaw) <= 0.35F) {
            clampedYaw = this.lastYaw + 0.45F;
        }

        float randomFactor = (float)(Math.random() * 0.15 - 0.075);
        float smoothYaw = MathHelper.lerp(0.3F, rotateVector.x, rotateVector.x + (yawDelta > 0.0F ? clampedYaw : -clampedYaw) + randomFactor);
        float smoothPitch = MathHelper.lerp(0.3F, rotateVector.y, MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? clampedPitch : -clampedPitch) + randomFactor, -80.0F, 80.0F));
        float gcd = SensUtils.getGCDValue();
        smoothYaw -= (smoothYaw - rotateVector.x) % gcd;
        smoothPitch -= (smoothPitch - rotateVector.y) % gcd;
        rotateVector = new Vector2f(smoothYaw, smoothPitch);
        this.lastYaw = clampedYaw;
        this.lastPitch = clampedPitch;
        if (options.getValueByName("Коррекция движения").get()) {
            mc.player.rotationYawOffset = smoothYaw;
        }
    }

    private void reallyWorldRotation() {
        double heightOffset = (double)target.getHeight() * 0.9;
        Vector3d vec = target.getPositionVec().add(0.0F, MathHelper.clamp(mc.player.getPosYEye() - target.getPosY(), 0.0F, heightOffset), 0.0F).subtract(mc.player.getEyePosition(1.0F));
        float currentYaw = mc.player.rotationYaw;
        float currentPitch = mc.player.rotationPitch;
        float targetYaw = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0F);
        float targetPitch = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
        targetPitch = MathHelper.clamp(targetPitch, -89.0F, 89.0F);
        boolean attack = this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed();
        if (attack) {
            float yawDelta1 = MathHelper.wrapDegrees(targetYaw - rotateVector.x);
            float pitchDelta1 = MathHelper.wrapDegrees(targetPitch - rotateVector.y);
            float baseSpeed = 95.0F;
            float accelFactor = 3.5F;
            float snapSpeed = baseSpeed * (1.0F + Math.min(Math.abs(yawDelta1) / 90.0F, 1.0F) * (accelFactor - 1.0F));
            float snapFactor = Math.min(1.0F, snapSpeed / Math.max(1.0F, Math.abs(yawDelta1)));
            float snapYaw = rotateVector.x + yawDelta1 * snapFactor;
            snapSpeed = baseSpeed * (1.0F + Math.min(Math.abs(pitchDelta1) / 90.0F, 1.0F) * (accelFactor - 1.0F));
            snapFactor = Math.min(1.0F, snapSpeed / Math.max(1.0F, Math.abs(pitchDelta1)));
            float snapPitch = rotateVector.y + pitchDelta1 * snapFactor;
            if (Math.abs(MathHelper.wrapDegrees(targetYaw - snapYaw)) < 0.1F) {
                snapYaw = targetYaw;
            }

            if (Math.abs(MathHelper.wrapDegrees(targetPitch - snapPitch)) < 0.1F) {
                snapPitch = targetPitch;
            }

            rotateVector = new Vector2f(snapYaw, snapPitch);
        } else {
            float returnSpeed = 80.0F;
            float yawDiff = MathHelper.wrapDegrees(currentYaw - rotateVector.x);
            float pitchDiff = MathHelper.wrapDegrees(currentPitch - rotateVector.y);
            float returnFactor = Math.min(1.0F, returnSpeed / Math.max(1.0F, Math.abs(yawDiff)));
            float returnYaw = rotateVector.x + yawDiff * returnFactor;
            returnFactor = Math.min(1.0F, returnSpeed / Math.max(1.0F, Math.abs(pitchDiff)));
            float returnPitch = rotateVector.y + pitchDiff * returnFactor;
            rotateVector = new Vector2f(returnYaw, returnPitch);
        }

        this.lastYaw = rotateVector.x;
        this.lastPitch = rotateVector.y;
        if (options.getValueByName("Коррекция движения").get()) {
            mc.player.rotationYawOffset = rotateVector.x;
        }
    }

    private void holyWorldRotation() {
        Vector3d vec = target.getPositionVec().add(0.0F, MathHelper.clamp(1.1, 0.3, target.getHeight()), 0.0F).subtract(mc.player.getEyePosition(1.0F));
        float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0F);
        float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
        float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
        float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
        float yawSpeed = Math.min(Math.max(Math.abs(yawDelta), 1.0F), 160.0F);
        float pitchSpeed = Math.min(Math.max(Math.abs(pitchDelta), 1.0F), 70.0F);
        float yaw = rotateVector.x + (yawDelta > 0.0F ? yawSpeed : -yawSpeed);
        float pitch = MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? pitchSpeed : -pitchSpeed), -89.0F, 89.0F);
        float twitchIntensity = 0.15F;
        float twitchFrequency = 0.03F;

        if (mc.player.ticksExisted % Math.max(1, (int)(twitchFrequency * 15.0F)) == 0) {
            yaw += (float)(Math.random() - 0.5F) * twitchIntensity;
            pitch += (float)(Math.random() - 0.5F) * twitchIntensity;
        }

        yaw += (float)(Math.random() - 0.5F) * 0.03F;
        pitch += (float)(Math.random() - 0.5F) * 0.03F;
        float gcd = SensUtils.getGCDValue();
        float gcdRandomizer = (float)(Math.random() * 0.008F + 0.996F);
        yaw -= (yaw - rotateVector.x) % (gcd * gcdRandomizer);
        pitch -= (pitch - rotateVector.y) % (gcd * gcdRandomizer);
        float maxYawChange = 40.0F;
        float maxPitchChange = 35.0F;
        yaw = rotateVector.x + MathHelper.clamp(yaw - rotateVector.x, -maxYawChange, maxYawChange);
        pitch = MathHelper.clamp(rotateVector.y + MathHelper.clamp(pitch - rotateVector.y, -maxPitchChange, maxPitchChange), -89.0F, 89.0F);
        rotateVector = new Vector2f(yaw, pitch);
        this.lastYaw = yaw;
        this.lastPitch = pitch;
        if (options.getValueByName("Коррекция движения").get()) {
            mc.player.rotationYawOffset = yaw;
        }
    }

    private Vector3d getPredictedPosition(LivingEntity t, float strength) {
        float yaw = t.rotationYaw;
        float pitch = t.rotationPitch;
        double yawRad = Math.toRadians(yaw);
        double pitchRad = Math.toRadians(pitch);
        double x = -Math.sin(yawRad) * Math.cos(pitchRad);
        double y = -Math.sin(pitchRad);
        double z = Math.cos(yawRad) * Math.cos(pitchRad);
        Vector3d lookVec = new Vector3d(x, y, z);
        return t.getPositionVec().add(lookVec.scale(strength));
    }

    private void baseRotationSpookytime() {
        Vector3d vec = predict.get() && target != null ? this.getPredictedPosition(target, predictStrength.get()) : target.getPositionVec();

        double var28 = mc.player.getPosYEye() - target.getPosY();
        double var10004 = target.getHeight();

        Vector3d var10000 = vec.add(0.0F, MathHelper.clamp(var28, 0.0F, var10004 - 1.0F * (mc.player.getDistanceEyePos(target) / (double)this.attackDistance())), 0.0F);

        vec = var10000.subtract(mc.player.getEyePosition(1.0F));
        this.isRotated = true;
        float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0F);
        float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
        float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
        float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);
        float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 0.5F), 70.8F);
        float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 0.0F), 12.3F);
        float targetYaw = rotateVector.x + (yawDelta > 1.0F ? clampedYaw : -clampedYaw);
        float targetPitch = rotateVector.y + (pitchDelta > 0.5F ? clampedPitch : -clampedPitch);
        float lerpFactor = 0.687F;
        float yaw = rotateVector.x + (targetYaw - rotateVector.x) * lerpFactor;
        float pitch = rotateVector.y + (targetPitch - rotateVector.y) * lerpFactor;
        float time = (float)(System.currentTimeMillis() % 10000L) / 720.0F;
        float oscillationAmplitudeYaw = 7.8F;
        float oscillationFrequencyYaw = 2.7F;
        float yawOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyYaw) * oscillationAmplitudeYaw;
        yaw += yawOscillation;
        float oscillationAmplitudePitch = 2.6F;
        float oscillationFrequencyPitch = 2.9F;
        float pitchOscillation = (float)Math.sin((double)(time * 2.0F) * Math.PI * (double)oscillationFrequencyPitch) * oscillationAmplitudePitch;
        pitch += pitchOscillation;
        pitch = MathHelper.clamp(pitch, -89.0F, 90.0F);
        float 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 float attackDistance() {
        if (options.getValueByName("Оптимальная дистанция атаки").get()) {
            return !mc.player.isSwimming() ? 3.6F : 3.0F;
        } else {
            return attackRange.get();
        }
    }

    float maxRange() {
        float var10000 = this.attackDistance();
        return var10000 + (mc.player.isElytraFlying() ? elytraRange.get() : 0.0F);
    }

    private static float additionalNavRange() {
        return 7.0F;
    }

    private void updateTarget() {
        List<LivingEntity> targetsList = new ArrayList<>();
        float navRange = additionalNavRange();

        // ИСПРАВЛЕНИЕ: Перебираем как Object, чтобы компилятор не ругался
        for (Object obj : mc.world.getAllEntities()) {
            // Проверяем, является ли объект живой сущностью
            if (obj instanceof LivingEntity) {
                LivingEntity living = (LivingEntity) obj;

                // Проверяем валидность цели
                if (this.isValidForNav(living, navRange)) {
                    targetsList.add(living);
                }
            }
        }

        if (targetsList.isEmpty()) {
            target = null;
        } else if (targetsList.size() == 1) {
            target = targetsList.get(0);
        } else {
            targetsList.sort(Comparator.comparingDouble((entityx) -> this.entityMathUtil((Entity)entityx, consider.getValueByName("Хп").get(), consider.getValueByName("Броню").get(), consider.getValueByName("Дистанцию").get(), this.maxRange(), consider.getValueByName("Баффы").get())).reversed());
            target = targetsList.get(0);
        }
    }

    private double entityMathUtil(Entity entity, boolean considerHp, boolean considerArmor, boolean considerDistance, double maxRange, boolean considerBuffs) {
        double score = 0.0F;
        if (entity instanceof LivingEntity) {
            LivingEntity living = (LivingEntity) entity;
            if (considerDistance) {
                double distance = mc.player.getDistance(entity);
                double distanceScore = Math.max(0.0F, maxRange - distance);
                score += distanceScore * 10.0F;
            }

            if (considerHp) {
                double hp = living.getHealth() + living.getAbsorptionAmount();
                double hpScore = Math.max(0.0F, 40.0F - hp);
                score += hpScore * 2.0F;
            }

            if (considerArmor && entity instanceof PlayerEntity) {
                int armor = ((PlayerEntity)entity).getTotalArmorValue();
                double armorScore = Math.max(0, 20 - armor);
                score += armorScore * 1.5F;
            }
        }

        return score;
    }

    private boolean isValidForNav(LivingEntity entity, float navRange) {
        if (entity instanceof ClientPlayerEntity) {
            return false;
        } else if (entity.ticksExisted < 3) {
            return false;
        } else {
            if (mc.player.getDistanceEyePos(entity) > (double)navRange) {
                return false;
            } else {
                if (entity instanceof PlayerEntity) {
                    PlayerEntity p = (PlayerEntity)entity;
                    if (!entity.getUniqueID().equals(PlayerEntity.getOfflineUUID(p.getGameProfile().getName()))) {
                        return false;
                    }

                    if (ignoreFriends.get() && FriendStorage.isFriend(p.getName().getString())) {
                        return false;
                    }

                    String var4 = p.getName().getString();
                    if (var4.equalsIgnoreCase(mc.player.getName().getString())) {
                        return false;
                    }
                }

                if (entity instanceof PlayerEntity && !targets.getValueByName("Игроки").get()) {
                    return false;
                } else if (entity instanceof PlayerEntity && entity.getTotalArmorValue() == 0 && !targets.getValueByName("Голые").get()) {
                    return false;
                } else if (entity instanceof PlayerEntity && entity.isInvisible() && entity.getTotalArmorValue() == 0 && !targets.getValueByName("Голые невидимки").get()) {
                    return false;
                } else if (entity instanceof PlayerEntity && entity.isInvisible() && !targets.getValueByName("Невидимки").get()) {
                    return false;
                } else if (entity instanceof PlayerEntity && ((PlayerEntity)entity).isCreative()) {
                    return false;
                } else if (entity instanceof MonsterEntity && !targets.getValueByName("Мобы").get()) {
                    return false;
                } else if (entity instanceof AnimalEntity && !targets.getValueByName("Животные").get()) {
                    return false;
                } else {
                    return !entity.isInvulnerable() && entity.isAlive() && !(entity instanceof ArmorStandEntity);
                }
            }
        }
    }

    private boolean isPlayerEating() {
        if (!mc.player.isHandActive()) {
            return false;
        } else {
            UseAction action = mc.player.getActiveItemStack().getUseAction();
            return action == UseAction.EAT || action == UseAction.DRINK;
        }
    }

    private void updateAttack() {
        this.selected = MouseUtil.getMouseOver(target, rotateVector.x, rotateVector.y, this.attackDistance());

        if (!(mc.player.getDistanceEyePos(target) > (double)this.attackDistance())) {
            if (moreOptions.getValueByName("Проверка луча").get()) {
                if (!mc.player.isElytraFlying() && this.selected == null) {
                    return;
                }
            }

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

            if ((!moreOptions.getValueByName("Не бить если кушаешь").get() || !this.isPlayerEating()) &&
                    (!moreOptions.getValueByName("Не бить если в гуи").get() || mc.currentScreen == null || mc.currentScreen instanceof ChatScreen || mc.currentScreen instanceof IngameMenuScreen) &&
                    (!ignoreFriends.get() || !(target instanceof PlayerEntity) || !FriendStorage.isFriend(target.getName().getString()))) {

                this.inputTick = 1;

                // В MCP нет serverSprintState, обычно это проверяют иначе или это кастомное поле.
                // Если не работает, удали эту проверку: if (mc.player.serverSprintState) return;

                this.stopWatch.setLastMS(500L);

                mc.playerController.attackEntity(mc.player, target);
                mc.player.swingArm(Hand.MAIN_HAND);
            }
        }
    }

    private float randomUtil(float min, float max) {
        return min + (max - min) * (new SecureRandom()).nextFloat();
    }

    public boolean shouldPlayerFalling() {
        return this.isPlayerFalling(this.critmode.is("Только криты"), this.critmode.is("Умные криты"), options.getValueByName("Синхронизировать с TPS").get());
    }

    private boolean isPlayerFalling(boolean onlyCrits, boolean smartCrits, boolean syncWithTPS) {
        if (!onlyCrits) {
            return true;
        } else if (smartCrits) {
            return !mc.player.isOnGround() && mc.player.fallDistance > 0.0F;
        } else {
            return !mc.player.isOnGround() && mc.player.fallDistance > 0.0F;
        }
    }

    private boolean isValid(LivingEntity entity) {
        return this.isValidForNav(entity, this.maxRange());
    }

    private void reset() {
        mc.player.rotationYawOffset = (float)Integer.MIN_VALUE;
        rotateVector = new Vector2f(mc.player.rotationYaw, mc.player.rotationPitch);
    }

    private float calculateCorrectYawOffset2(float yaw) {
        return yaw;
    }

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

    public boolean onDisable() {
        super.onDisable();
        if (mc.player != null && mc.player.isSprinting()) {
            mc.player.setSprinting(false);
        }

        if (this.type.is("SpookyTime") && mc.player != null) {
            mc.player.rotationYaw = rotateVector.x;
            mc.player.rotationPitch = rotateVector.y;
            mc.player.rotationYawHead = rotateVector.x;
            mc.player.renderYawOffset = rotateVector.x;
            mc.player.rotationPitchHead = rotateVector.y;
        }

        this.reset();
        this.stopWatch.setLastMS(0L);
        target = null;
        mc.timer.timerSpeed = 1.0F;
        return false;
    }

    public ModeSetting getType() {
        return this.type;
    }

    public ModeListSetting getOptions() {
        return options;
    }

    public ModeListSetting getMoreOptions() {
        return this.moreOptions;
    }

    public StopWatch getStopWatch() {
        return this.stopWatch;
    }

    public void setTarget(LivingEntity target) {
        Aura.target = target; // Исправлено на Aura.target
    }

    private double getEntityArmor(PlayerEntity entityPlayer2) {
        double d2 = 0.0F;

        for(int i2 = 0; i2 < 4; ++i2) {
            ItemStack is = entityPlayer2.inventory.armorInventory.get(i2);
            if (is.getItem() instanceof ArmorItem) {
                d2 += this.getProtectionLvl(is);
            }
        }

        return d2;
    }

    private double getProtectionLvl(ItemStack stack) {
        Item var3 = stack.getItem();
        if (var3 instanceof ArmorItem) {
            ArmorItem i = (ArmorItem) var3;
            double damageReduceAmount = i.getDamageReduceAmount();
            if (stack.isEnchanted()) {
                damageReduceAmount += EnchantmentHelper.getEnchantmentLevel(Enchantments.PROTECTION, stack) * 0.25F;
            }

            return damageReduceAmount;
        } else {
            return 0.0F;
        }
    }

    private double getEntityHealth(LivingEntity ent) {
        if (ent instanceof PlayerEntity) {
            PlayerEntity player = (PlayerEntity) ent;
            return (double)(player.getHealth() + player.getAbsorptionAmount()) * (this.getEntityArmor(player) / 20.0F);
        } else {
            return (double)(ent.getHealth() + ent.getAbsorptionAmount());
        }
    }

    public static LivingEntity getTarget() {
        return target;
    }
}
 
0-0 Ивправду старый сурс код нашей базы Чита 1.16.5, ну кстати килку можете брать и пастить, килки фулл обход кроме ФТ килки тк забили на неё, а про код как писался на дабл норм???
Кстати килка ХВ фулл ворк, а РВ байпас , но хуйня обход, а про килку СП- килка фулл ворк, но с учётом если будете в игроке, то напишите джитеры!!!
 
Назад
Сверху Снизу