Я даун тупой которые продает YouGame client
Хоть и Обрыгалик что то тоже пастит но хотя бы там килка лучше чем твоя и твое ебаного позорного NeverDieСкрытое содержимое
я эту залупу не спасщю в невердай
Я даун тупой которые продает YouGame client
Хоть и Обрыгалик что то тоже пастит но хотя бы там килка лучше чем твоя и твое ебаного позорного NeverDieСкрытое содержимое
я эту залупу не спасщю в невердай
/del килка хуевая мне не нравитсяесли захотите manloxx client nightli deobf то жду акктиваКод:package ru.neverdie.functions.impl.combat; import com.google.common.eventbus.Subscribe; import lombok.Getter; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.item.ArmorStandEntity; import net.minecraft.entity.merchant.villager.VillagerEntity; import net.minecraft.entity.monster.MonsterEntity; import net.minecraft.entity.monster.PhantomEntity; import net.minecraft.entity.passive.AnimalEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.network.play.client.CHeldItemChangePacket; import net.minecraft.util.Hand; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RayTraceContext; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.vector.Vector2f; import net.minecraft.util.math.vector.Vector3d; import ru.neverdie.NeverDie; import ru.neverdie.command.friends.FriendStorage; import ru.neverdie.events.EventInput; import ru.neverdie.events.EventMotion; import ru.neverdie.events.EventUpdate; import ru.neverdie.functions.api.Category; import ru.neverdie.functions.api.Function; import ru.neverdie.functions.api.FunctionRegister; import ru.neverdie.functions.settings.impl.BooleanSetting; import ru.neverdie.functions.settings.impl.ModeListSetting; import ru.neverdie.functions.settings.impl.ModeSetting; import ru.neverdie.functions.settings.impl.SliderSetting; import ru.neverdie.utils.client.Calculator; import ru.neverdie.utils.math.SensUtils; import ru.neverdie.utils.math.StopWatch; import ru.neverdie.utils.player.AttackUtil; import ru.neverdie.utils.player.InventoryUtil; import ru.neverdie.utils.player.MouseUtil; import ru.neverdie.utils.player.MoveUtils; import java.util.ArrayList; import java.util.Comparator; import java.util.List; @FunctionRegister(name = "KillAura", type = Category.бой) public class KillAura extends Function { @Getter private final ModeSetting type = new ModeSetting("Ротация", "Плавная", "Плавная", "Резкая"); @Getter static final ModeListSetting options = new ModeListSetting("Опции", new BooleanSetting("Только криты", true), new BooleanSetting("Оптимальная дистанция атаки", true), new BooleanSetting("Ломать щит", true), new BooleanSetting("Отжимать щит", true), new BooleanSetting("Ускорять ротацию при атаке", false), new BooleanSetting("Синхронизация с TPS", false), new BooleanSetting("Фокусировать одну цель", true), new BooleanSetting("Коррекция движения", true) ); public static final SliderSetting attackRange = new SliderSetting("Дистанция аттаки", 3.0F, 3.0F, 6.0F, 0.1F).setVisible(() -> !options.getValueByName("Оптимальная дистанция атаки").get()); private final SliderSetting rotationRange = new SliderSetting("Дистанция ротации", 0.6F, 0.0F, 3.0F, 0.1F); private final SliderSetting elytraRotation = new SliderSetting("Элитра ротация", 20F, 0F, 30F, 0.5F); final ModeListSetting targets = new ModeListSetting("Таргеты", new BooleanSetting("Игроки", true), new BooleanSetting("Голые", true), new BooleanSetting("Мобы", false), new BooleanSetting("Животные", false), new BooleanSetting("Друзья", false) ); @Getter final ModeListSetting consider = new ModeListSetting("Учитывать", new BooleanSetting("Хп", true), new BooleanSetting("Броню", true), new BooleanSetting("Дистанцию", true), new BooleanSetting("Баффы", true) ); public final ModeSetting correction = new ModeSetting("Тип коррекции", "Сфокусированная", "Незаметная", "Сфокусированная").setVisible(() -> options.getValueByName("Коррекция движения").get()); public final BooleanSetting wallCheck = new BooleanSetting("Бить через стены", true); public final BooleanSetting noAttackIfEat = new BooleanSetting("Не бить если ешь", true); public final BooleanSetting onlySpace = new BooleanSetting("Умные криты", false).setVisible(() -> options.getValueByName("Только криты").get()); public static Vector2f rotateVector = new Vector2f(0.0F, 0.0F); public static Vector2f pearlVector = null; float lastYaw; float lastPitch; @Getter private final StopWatch stopWatch = new StopWatch(); @Getter private static LivingEntity target; private Entity selected; public int ticks = 0; public boolean isRotated; public final AutoPotion autoPotion; public KillAura(AutoPotion autoPotion) { this.autoPotion = autoPotion; this.addSettings(this.type, attackRange, this.rotationRange, this.elytraRotation, this.targets, this.consider, options, this.correction, this.wallCheck, this.noAttackIfEat, this.onlySpace); } @Subscribe private void onInput(EventInput e) { if (target != null && options.getValueByName("Коррекция движения").get() && this.correction.is("Незаметная")) { MoveUtils.fixMovement(e, NeverDie.getInstance().getFunctionRegistry().getAutopotion().isActive() ? mc.player.rotationYaw : rotateVector.x); } } @Subscribe public void onUpdate(EventUpdate e) { if (options.getValueByName("Фокусировать одну цель").get() && (target == null || !this.isValid(target)) || !(Boolean) options.getValueByName("Фокусировать одну цель").get()) { this.updateTarget(); } if (target == null) { this.stopWatch.setLastMS(0L); this.reset(); return; } this.isRotated = false; if (this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed()) { this.updateAttack(); this.ticks = 2; } if (this.type.is("Резкая")) { if (this.ticks > 0) { this.updateRotation(true, 180.0F, 90.0F); --this.ticks; } else { this.reset(); } } else if (!this.isRotated) { this.updateRotation(false, 115.0F, 60.0F); } } @Subscribe private void onWalking(EventMotion e) { if (target == null || (this.autoPotion.isState() && this.autoPotion.isActive())) return; float yaw = rotateVector.x; float pitch = rotateVector.y; e.setYaw(yaw); e.setPitch(pitch); mc.player.rotationYawHead = yaw; mc.player.renderYawOffset = yaw; mc.player.rotationPitchHead = pitch; } private void updateTarget() { List<LivingEntity> targets = new ArrayList<>(); for (Entity entity : mc.world.getAllEntities()) { if (!(entity instanceof LivingEntity living)) continue; if (!this.isValid(living)) continue; targets.add(living); } if (targets.isEmpty()) { target = null; return; } if (targets.size() == 1) { target = targets.get(0); return; } targets.sort(Comparator.comparingDouble(entity -> Calculator.entity( entity, consider.getValueByName("Хп").get(), consider.getValueByName("Броню").get(), consider.getValueByName("Дистанцию").get(), attackDistance() + rotationRange.get() + (mc.player.isElytraFlying() ? elytraRotation.get() : 0.0), consider.getValueByName("Баффы").get() ))); target = targets.get(0); } private void updateRotation(boolean attack, float rotationYawSpeed, float rotationPitchSpeed) { float yawToTarget; float pitchToTarget; if (pearlVector == null) { Vector3d vec = target.getPositionVec().add(0.0, MathHelper.clamp(mc.player.getPosYEye() - target.getPosY(), 0.0, (double) target.getHeight() * (mc.player.getDistanceEyePos(target) / attackDistance())), 0.0).subtract(mc.player.getEyePosition(1.0F)); this.isRotated = true; yawToTarget = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0); pitchToTarget = (float) (-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z)))); } else { this.isRotated = true; yawToTarget = pearlVector.x; pitchToTarget = pearlVector.y; } float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x); float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y); int roundedYaw = (int) yawDelta; float gcd = SensUtils.getGCDValue(); float clampedYaw; float clampedPitch; float yaw; float pitch; if (type.is("Плавная") && pearlVector == null) { clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 1.0F), rotationYawSpeed); clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 1.0F), rotationPitchSpeed); if (attack && this.selected != target && options.getValueByName("Ускорять ротацию при атаке").get()) { clampedPitch = Math.max(Math.abs(pitchDelta), 1.0F); clampedYaw = Math.max(Math.abs(yawDelta), 1.0F); } else { clampedPitch /= 3.0F; } if (Math.abs(clampedYaw - this.lastYaw) <= 3.0F) { clampedYaw = this.lastYaw + 3.3F; } yaw = rotateVector.x + (yawDelta > 0.0F ? clampedYaw : -clampedYaw); pitch = MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? clampedPitch : -clampedPitch), -89.0F, 89.0F); yaw -= (yaw - rotateVector.x) % gcd; pitch -= (pitch - rotateVector.y) % gcd; rotateVector = new Vector2f(yaw, pitch); this.lastYaw = clampedYaw; this.lastPitch = clampedPitch; } else if (type.is("Резкая") || pearlVector != null) { yaw = rotateVector.x + (float) roundedYaw; pitch = MathHelper.clamp(rotateVector.y + pitchDelta, -90.0F, 90.0F); yaw -= (yaw - rotateVector.x) % gcd; pitch -= (pitch - rotateVector.y) % gcd; rotateVector = new Vector2f(yaw, pitch); } else yaw = mc.player.rotationYaw; if (options.getValueByName("Коррекция движения").get()) mc.player.rotationYawOffset = yaw; } private boolean canSeeThroughWall(Entity entity) { return mc.world.rayTraceBlocks(new RayTraceContext( mc.player.getEyePosition(1.0F), entity.getEyePosition(1.0F), RayTraceContext.BlockMode.COLLIDER, RayTraceContext.FluidMode.NONE, mc.player) ).getType() == RayTraceResult.Type.MISS; } private void updateAttack() { if (this.noAttackIfEat.get() && mc.player.isHandActive()) return; this.selected = MouseUtil.getMouseOver(target, rotateVector.x, rotateVector.y, this.attackDistance()); if ((selected == null || selected != target) && !mc.player.isElytraFlying()) return; if (options.getValueByName("Ускорять ротацию при атаке").get()) { this.updateRotation(true, 40.0F, 45.0F); } if (target.getDistance(mc.player) > attackDistance()) return; if (mc.player.isBlocking() && options.getValueByName("Отжимать щит").get()) mc.playerController.onStoppedUsingItem(mc.player); if (target instanceof PlayerEntity player && player.isBlocking() && options.getValueByName("Ломать щит").get()) { int hbSlot = InventoryUtil.getInstance().getAxeInInventory(true); int invSlot = InventoryUtil.getInstance().getAxeInInventory(false); int slot = breakShieldPlayer(player, hbSlot, invSlot); if (slot > 8) mc.playerController.pickItem(slot); } this.stopWatch.setLastMS(550L); mc.playerController.attackEntity(mc.player, target); mc.player.swingArm(Hand.MAIN_HAND); } private double attackDistance() { if (options.getValueByName("Оптимальная дистанция атаки").get() && !mc.player.isSwimming()) { return 3.6f; } if (mc.player.isSwimming()) { return 3.0f; } return attackRange.get(); } private boolean shouldPlayerFalling() { return AttackUtil.isPlayerFalling(true, this.onlySpace.get(), options.getValueByName("Синхронизация с TPS").get()); } public static Vector3d getVector(LivingEntity target) { double wHalf = target.getWidth() / 2.0F; double yExpand = MathHelper.clamp(target.getPosYEye() - target.getPosY(), 0.0, target.getHeight()); double xExpand = MathHelper.clamp(mc.player.getPosX() - target.getPosX(), -wHalf, wHalf); double zExpand = MathHelper.clamp(mc.player.getPosZ() - target.getPosZ(), -wHalf, wHalf); return new Vector3d(target.getPosX() - mc.player.getPosX() + xExpand, target.getPosY() - mc.player.getPosYEye() + yExpand, target.getPosZ() - mc.player.getPosZ() + zExpand); } private double getDistance(LivingEntity entity) { return getVector(entity).length(); } private boolean isValid(LivingEntity entity) { if (!this.wallCheck.get() && !this.canSeeThroughWall(entity)) return false; if (entity instanceof ClientPlayerEntity) return false; if (entity.ticksExisted < 3) return false; if (entity instanceof PlayerEntity p) { if (AntiBot.checkBot(entity)) return false; if (!this.targets.getValueByName("Друзья").get() && FriendStorage.isFriend(p.getName().getString())) return false; if (p.getName().getString().equalsIgnoreCase(mc.player.getName().getString())) return false; } if (entity instanceof PlayerEntity && !(Boolean) this.targets.getValueByName("Игроки").get()) return false; if (entity instanceof PlayerEntity && entity.getTotalArmorValue() == 0 && !(Boolean) this.targets.getValueByName("Голые").get()) return false; if (entity instanceof MonsterEntity && !(Boolean) this.targets.getValueByName("Мобы").get() || entity instanceof PhantomEntity && !(Boolean) this.targets.getValueByName("Мобы").get()) return false; if (entity instanceof AnimalEntity && !(Boolean) this.targets.getValueByName("Животные").get()) return false; if (entity instanceof VillagerEntity || entity instanceof ArmorStandEntity) return false; if (entity.isInvulnerable() || !entity.isAlive()) return false; double maxDistance = attackDistance() + rotationRange.get(); if (mc.player.isElytraFlying()) maxDistance += elytraRotation.get(); return this.getDistance(entity) <= maxDistance; } InventoryUtil.Hand handUtil = new InventoryUtil.Hand(); private int breakShieldPlayer(PlayerEntity entity, int hbSlot, int invSlot) { if (hbSlot != -1) { this.handUtil.setOriginalSlot(mc.player.inventory.currentItem); mc.player.connection.sendPacket(new CHeldItemChangePacket(hbSlot)); mc.playerController.attackEntity(mc.player, entity); mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem)); return hbSlot; } if (invSlot != -1) { handUtil.setOriginalSlot(mc.player.inventory.currentItem); mc.playerController.pickItem(invSlot); mc.playerController.attackEntity(mc.player, entity); if (InventoryUtil.findEmptySlot(true) != -1) mc.playerController.pickItem(invSlot); mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem)); return invSlot; } return -1; } private void reset() { if (options.getValueByName("Коррекция движения").get()) { mc.player.rotationYawOffset = -2.14748365E9F; } rotateVector = new Vector2f(mc.player.rotationYaw, mc.player.rotationPitch); } public void onEnable() { super.onEnable(); this.reset(); target = null; pearlVector = null; } public void onDisable() { super.onDisable(); this.reset(); this.stopWatch.setLastMS(0L); target = null; } }
/del удаляйесли захотите manloxx client nightli deobf то жду акктиваКод:package ru.neverdie.functions.impl.combat; import com.google.common.eventbus.Subscribe; import lombok.Getter; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.item.ArmorStandEntity; import net.minecraft.entity.merchant.villager.VillagerEntity; import net.minecraft.entity.monster.MonsterEntity; import net.minecraft.entity.monster.PhantomEntity; import net.minecraft.entity.passive.AnimalEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.network.play.client.CHeldItemChangePacket; import net.minecraft.util.Hand; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RayTraceContext; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.vector.Vector2f; import net.minecraft.util.math.vector.Vector3d; import ru.neverdie.NeverDie; import ru.neverdie.command.friends.FriendStorage; import ru.neverdie.events.EventInput; import ru.neverdie.events.EventMotion; import ru.neverdie.events.EventUpdate; import ru.neverdie.functions.api.Category; import ru.neverdie.functions.api.Function; import ru.neverdie.functions.api.FunctionRegister; import ru.neverdie.functions.settings.impl.BooleanSetting; import ru.neverdie.functions.settings.impl.ModeListSetting; import ru.neverdie.functions.settings.impl.ModeSetting; import ru.neverdie.functions.settings.impl.SliderSetting; import ru.neverdie.utils.client.Calculator; import ru.neverdie.utils.math.SensUtils; import ru.neverdie.utils.math.StopWatch; import ru.neverdie.utils.player.AttackUtil; import ru.neverdie.utils.player.InventoryUtil; import ru.neverdie.utils.player.MouseUtil; import ru.neverdie.utils.player.MoveUtils; import java.util.ArrayList; import java.util.Comparator; import java.util.List; @FunctionRegister(name = "KillAura", type = Category.бой) public class KillAura extends Function { @Getter private final ModeSetting type = new ModeSetting("Ротация", "Плавная", "Плавная", "Резкая"); @Getter static final ModeListSetting options = new ModeListSetting("Опции", new BooleanSetting("Только криты", true), new BooleanSetting("Оптимальная дистанция атаки", true), new BooleanSetting("Ломать щит", true), new BooleanSetting("Отжимать щит", true), new BooleanSetting("Ускорять ротацию при атаке", false), new BooleanSetting("Синхронизация с TPS", false), new BooleanSetting("Фокусировать одну цель", true), new BooleanSetting("Коррекция движения", true) ); public static final SliderSetting attackRange = new SliderSetting("Дистанция аттаки", 3.0F, 3.0F, 6.0F, 0.1F).setVisible(() -> !options.getValueByName("Оптимальная дистанция атаки").get()); private final SliderSetting rotationRange = new SliderSetting("Дистанция ротации", 0.6F, 0.0F, 3.0F, 0.1F); private final SliderSetting elytraRotation = new SliderSetting("Элитра ротация", 20F, 0F, 30F, 0.5F); final ModeListSetting targets = new ModeListSetting("Таргеты", new BooleanSetting("Игроки", true), new BooleanSetting("Голые", true), new BooleanSetting("Мобы", false), new BooleanSetting("Животные", false), new BooleanSetting("Друзья", false) ); @Getter final ModeListSetting consider = new ModeListSetting("Учитывать", new BooleanSetting("Хп", true), new BooleanSetting("Броню", true), new BooleanSetting("Дистанцию", true), new BooleanSetting("Баффы", true) ); public final ModeSetting correction = new ModeSetting("Тип коррекции", "Сфокусированная", "Незаметная", "Сфокусированная").setVisible(() -> options.getValueByName("Коррекция движения").get()); public final BooleanSetting wallCheck = new BooleanSetting("Бить через стены", true); public final BooleanSetting noAttackIfEat = new BooleanSetting("Не бить если ешь", true); public final BooleanSetting onlySpace = new BooleanSetting("Умные криты", false).setVisible(() -> options.getValueByName("Только криты").get()); public static Vector2f rotateVector = new Vector2f(0.0F, 0.0F); public static Vector2f pearlVector = null; float lastYaw; float lastPitch; @Getter private final StopWatch stopWatch = new StopWatch(); @Getter private static LivingEntity target; private Entity selected; public int ticks = 0; public boolean isRotated; public final AutoPotion autoPotion; public KillAura(AutoPotion autoPotion) { this.autoPotion = autoPotion; this.addSettings(this.type, attackRange, this.rotationRange, this.elytraRotation, this.targets, this.consider, options, this.correction, this.wallCheck, this.noAttackIfEat, this.onlySpace); } @Subscribe private void onInput(EventInput e) { if (target != null && options.getValueByName("Коррекция движения").get() && this.correction.is("Незаметная")) { MoveUtils.fixMovement(e, NeverDie.getInstance().getFunctionRegistry().getAutopotion().isActive() ? mc.player.rotationYaw : rotateVector.x); } } @Subscribe public void onUpdate(EventUpdate e) { if (options.getValueByName("Фокусировать одну цель").get() && (target == null || !this.isValid(target)) || !(Boolean) options.getValueByName("Фокусировать одну цель").get()) { this.updateTarget(); } if (target == null) { this.stopWatch.setLastMS(0L); this.reset(); return; } this.isRotated = false; if (this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed()) { this.updateAttack(); this.ticks = 2; } if (this.type.is("Резкая")) { if (this.ticks > 0) { this.updateRotation(true, 180.0F, 90.0F); --this.ticks; } else { this.reset(); } } else if (!this.isRotated) { this.updateRotation(false, 115.0F, 60.0F); } } @Subscribe private void onWalking(EventMotion e) { if (target == null || (this.autoPotion.isState() && this.autoPotion.isActive())) return; float yaw = rotateVector.x; float pitch = rotateVector.y; e.setYaw(yaw); e.setPitch(pitch); mc.player.rotationYawHead = yaw; mc.player.renderYawOffset = yaw; mc.player.rotationPitchHead = pitch; } private void updateTarget() { List<LivingEntity> targets = new ArrayList<>(); for (Entity entity : mc.world.getAllEntities()) { if (!(entity instanceof LivingEntity living)) continue; if (!this.isValid(living)) continue; targets.add(living); } if (targets.isEmpty()) { target = null; return; } if (targets.size() == 1) { target = targets.get(0); return; } targets.sort(Comparator.comparingDouble(entity -> Calculator.entity( entity, consider.getValueByName("Хп").get(), consider.getValueByName("Броню").get(), consider.getValueByName("Дистанцию").get(), attackDistance() + rotationRange.get() + (mc.player.isElytraFlying() ? elytraRotation.get() : 0.0), consider.getValueByName("Баффы").get() ))); target = targets.get(0); } private void updateRotation(boolean attack, float rotationYawSpeed, float rotationPitchSpeed) { float yawToTarget; float pitchToTarget; if (pearlVector == null) { Vector3d vec = target.getPositionVec().add(0.0, MathHelper.clamp(mc.player.getPosYEye() - target.getPosY(), 0.0, (double) target.getHeight() * (mc.player.getDistanceEyePos(target) / attackDistance())), 0.0).subtract(mc.player.getEyePosition(1.0F)); this.isRotated = true; yawToTarget = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0); pitchToTarget = (float) (-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z)))); } else { this.isRotated = true; yawToTarget = pearlVector.x; pitchToTarget = pearlVector.y; } float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x); float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y); int roundedYaw = (int) yawDelta; float gcd = SensUtils.getGCDValue(); float clampedYaw; float clampedPitch; float yaw; float pitch; if (type.is("Плавная") && pearlVector == null) { clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 1.0F), rotationYawSpeed); clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 1.0F), rotationPitchSpeed); if (attack && this.selected != target && options.getValueByName("Ускорять ротацию при атаке").get()) { clampedPitch = Math.max(Math.abs(pitchDelta), 1.0F); clampedYaw = Math.max(Math.abs(yawDelta), 1.0F); } else { clampedPitch /= 3.0F; } if (Math.abs(clampedYaw - this.lastYaw) <= 3.0F) { clampedYaw = this.lastYaw + 3.3F; } yaw = rotateVector.x + (yawDelta > 0.0F ? clampedYaw : -clampedYaw); pitch = MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? clampedPitch : -clampedPitch), -89.0F, 89.0F); yaw -= (yaw - rotateVector.x) % gcd; pitch -= (pitch - rotateVector.y) % gcd; rotateVector = new Vector2f(yaw, pitch); this.lastYaw = clampedYaw; this.lastPitch = clampedPitch; } else if (type.is("Резкая") || pearlVector != null) { yaw = rotateVector.x + (float) roundedYaw; pitch = MathHelper.clamp(rotateVector.y + pitchDelta, -90.0F, 90.0F); yaw -= (yaw - rotateVector.x) % gcd; pitch -= (pitch - rotateVector.y) % gcd; rotateVector = new Vector2f(yaw, pitch); } else yaw = mc.player.rotationYaw; if (options.getValueByName("Коррекция движения").get()) mc.player.rotationYawOffset = yaw; } private boolean canSeeThroughWall(Entity entity) { return mc.world.rayTraceBlocks(new RayTraceContext( mc.player.getEyePosition(1.0F), entity.getEyePosition(1.0F), RayTraceContext.BlockMode.COLLIDER, RayTraceContext.FluidMode.NONE, mc.player) ).getType() == RayTraceResult.Type.MISS; } private void updateAttack() { if (this.noAttackIfEat.get() && mc.player.isHandActive()) return; this.selected = MouseUtil.getMouseOver(target, rotateVector.x, rotateVector.y, this.attackDistance()); if ((selected == null || selected != target) && !mc.player.isElytraFlying()) return; if (options.getValueByName("Ускорять ротацию при атаке").get()) { this.updateRotation(true, 40.0F, 45.0F); } if (target.getDistance(mc.player) > attackDistance()) return; if (mc.player.isBlocking() && options.getValueByName("Отжимать щит").get()) mc.playerController.onStoppedUsingItem(mc.player); if (target instanceof PlayerEntity player && player.isBlocking() && options.getValueByName("Ломать щит").get()) { int hbSlot = InventoryUtil.getInstance().getAxeInInventory(true); int invSlot = InventoryUtil.getInstance().getAxeInInventory(false); int slot = breakShieldPlayer(player, hbSlot, invSlot); if (slot > 8) mc.playerController.pickItem(slot); } this.stopWatch.setLastMS(550L); mc.playerController.attackEntity(mc.player, target); mc.player.swingArm(Hand.MAIN_HAND); } private double attackDistance() { if (options.getValueByName("Оптимальная дистанция атаки").get() && !mc.player.isSwimming()) { return 3.6f; } if (mc.player.isSwimming()) { return 3.0f; } return attackRange.get(); } private boolean shouldPlayerFalling() { return AttackUtil.isPlayerFalling(true, this.onlySpace.get(), options.getValueByName("Синхронизация с TPS").get()); } public static Vector3d getVector(LivingEntity target) { double wHalf = target.getWidth() / 2.0F; double yExpand = MathHelper.clamp(target.getPosYEye() - target.getPosY(), 0.0, target.getHeight()); double xExpand = MathHelper.clamp(mc.player.getPosX() - target.getPosX(), -wHalf, wHalf); double zExpand = MathHelper.clamp(mc.player.getPosZ() - target.getPosZ(), -wHalf, wHalf); return new Vector3d(target.getPosX() - mc.player.getPosX() + xExpand, target.getPosY() - mc.player.getPosYEye() + yExpand, target.getPosZ() - mc.player.getPosZ() + zExpand); } private double getDistance(LivingEntity entity) { return getVector(entity).length(); } private boolean isValid(LivingEntity entity) { if (!this.wallCheck.get() && !this.canSeeThroughWall(entity)) return false; if (entity instanceof ClientPlayerEntity) return false; if (entity.ticksExisted < 3) return false; if (entity instanceof PlayerEntity p) { if (AntiBot.checkBot(entity)) return false; if (!this.targets.getValueByName("Друзья").get() && FriendStorage.isFriend(p.getName().getString())) return false; if (p.getName().getString().equalsIgnoreCase(mc.player.getName().getString())) return false; } if (entity instanceof PlayerEntity && !(Boolean) this.targets.getValueByName("Игроки").get()) return false; if (entity instanceof PlayerEntity && entity.getTotalArmorValue() == 0 && !(Boolean) this.targets.getValueByName("Голые").get()) return false; if (entity instanceof MonsterEntity && !(Boolean) this.targets.getValueByName("Мобы").get() || entity instanceof PhantomEntity && !(Boolean) this.targets.getValueByName("Мобы").get()) return false; if (entity instanceof AnimalEntity && !(Boolean) this.targets.getValueByName("Животные").get()) return false; if (entity instanceof VillagerEntity || entity instanceof ArmorStandEntity) return false; if (entity.isInvulnerable() || !entity.isAlive()) return false; double maxDistance = attackDistance() + rotationRange.get(); if (mc.player.isElytraFlying()) maxDistance += elytraRotation.get(); return this.getDistance(entity) <= maxDistance; } InventoryUtil.Hand handUtil = new InventoryUtil.Hand(); private int breakShieldPlayer(PlayerEntity entity, int hbSlot, int invSlot) { if (hbSlot != -1) { this.handUtil.setOriginalSlot(mc.player.inventory.currentItem); mc.player.connection.sendPacket(new CHeldItemChangePacket(hbSlot)); mc.playerController.attackEntity(mc.player, entity); mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem)); return hbSlot; } if (invSlot != -1) { handUtil.setOriginalSlot(mc.player.inventory.currentItem); mc.playerController.pickItem(invSlot); mc.playerController.attackEntity(mc.player, entity); if (InventoryUtil.findEmptySlot(true) != -1) mc.playerController.pickItem(invSlot); mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem)); return invSlot; } return -1; } private void reset() { if (options.getValueByName("Коррекция движения").get()) { mc.player.rotationYawOffset = -2.14748365E9F; } rotateVector = new Vector2f(mc.player.rotationYaw, mc.player.rotationPitch); } public void onEnable() { super.onEnable(); this.reset(); target = null; pearlVector = null; } public void onDisable() { super.onDisable(); this.reset(); this.stopWatch.setLastMS(0L); target = null; } }
спиздилесли захотите manloxx client nightli deobf то жду акктиваКод:package ru.neverdie.functions.impl.combat; import com.google.common.eventbus.Subscribe; import lombok.Getter; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.item.ArmorStandEntity; import net.minecraft.entity.merchant.villager.VillagerEntity; import net.minecraft.entity.monster.MonsterEntity; import net.minecraft.entity.monster.PhantomEntity; import net.minecraft.entity.passive.AnimalEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.network.play.client.CHeldItemChangePacket; import net.minecraft.util.Hand; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RayTraceContext; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.vector.Vector2f; import net.minecraft.util.math.vector.Vector3d; import ru.neverdie.NeverDie; import ru.neverdie.command.friends.FriendStorage; import ru.neverdie.events.EventInput; import ru.neverdie.events.EventMotion; import ru.neverdie.events.EventUpdate; import ru.neverdie.functions.api.Category; import ru.neverdie.functions.api.Function; import ru.neverdie.functions.api.FunctionRegister; import ru.neverdie.functions.settings.impl.BooleanSetting; import ru.neverdie.functions.settings.impl.ModeListSetting; import ru.neverdie.functions.settings.impl.ModeSetting; import ru.neverdie.functions.settings.impl.SliderSetting; import ru.neverdie.utils.client.Calculator; import ru.neverdie.utils.math.SensUtils; import ru.neverdie.utils.math.StopWatch; import ru.neverdie.utils.player.AttackUtil; import ru.neverdie.utils.player.InventoryUtil; import ru.neverdie.utils.player.MouseUtil; import ru.neverdie.utils.player.MoveUtils; import java.util.ArrayList; import java.util.Comparator; import java.util.List; @FunctionRegister(name = "KillAura", type = Category.бой) public class KillAura extends Function { @Getter private final ModeSetting type = new ModeSetting("Ротация", "Плавная", "Плавная", "Резкая"); @Getter static final ModeListSetting options = new ModeListSetting("Опции", new BooleanSetting("Только криты", true), new BooleanSetting("Оптимальная дистанция атаки", true), new BooleanSetting("Ломать щит", true), new BooleanSetting("Отжимать щит", true), new BooleanSetting("Ускорять ротацию при атаке", false), new BooleanSetting("Синхронизация с TPS", false), new BooleanSetting("Фокусировать одну цель", true), new BooleanSetting("Коррекция движения", true) ); public static final SliderSetting attackRange = new SliderSetting("Дистанция аттаки", 3.0F, 3.0F, 6.0F, 0.1F).setVisible(() -> !options.getValueByName("Оптимальная дистанция атаки").get()); private final SliderSetting rotationRange = new SliderSetting("Дистанция ротации", 0.6F, 0.0F, 3.0F, 0.1F); private final SliderSetting elytraRotation = new SliderSetting("Элитра ротация", 20F, 0F, 30F, 0.5F); final ModeListSetting targets = new ModeListSetting("Таргеты", new BooleanSetting("Игроки", true), new BooleanSetting("Голые", true), new BooleanSetting("Мобы", false), new BooleanSetting("Животные", false), new BooleanSetting("Друзья", false) ); @Getter final ModeListSetting consider = new ModeListSetting("Учитывать", new BooleanSetting("Хп", true), new BooleanSetting("Броню", true), new BooleanSetting("Дистанцию", true), new BooleanSetting("Баффы", true) ); public final ModeSetting correction = new ModeSetting("Тип коррекции", "Сфокусированная", "Незаметная", "Сфокусированная").setVisible(() -> options.getValueByName("Коррекция движения").get()); public final BooleanSetting wallCheck = new BooleanSetting("Бить через стены", true); public final BooleanSetting noAttackIfEat = new BooleanSetting("Не бить если ешь", true); public final BooleanSetting onlySpace = new BooleanSetting("Умные криты", false).setVisible(() -> options.getValueByName("Только криты").get()); public static Vector2f rotateVector = new Vector2f(0.0F, 0.0F); public static Vector2f pearlVector = null; float lastYaw; float lastPitch; @Getter private final StopWatch stopWatch = new StopWatch(); @Getter private static LivingEntity target; private Entity selected; public int ticks = 0; public boolean isRotated; public final AutoPotion autoPotion; public KillAura(AutoPotion autoPotion) { this.autoPotion = autoPotion; this.addSettings(this.type, attackRange, this.rotationRange, this.elytraRotation, this.targets, this.consider, options, this.correction, this.wallCheck, this.noAttackIfEat, this.onlySpace); } @Subscribe private void onInput(EventInput e) { if (target != null && options.getValueByName("Коррекция движения").get() && this.correction.is("Незаметная")) { MoveUtils.fixMovement(e, NeverDie.getInstance().getFunctionRegistry().getAutopotion().isActive() ? mc.player.rotationYaw : rotateVector.x); } } @Subscribe public void onUpdate(EventUpdate e) { if (options.getValueByName("Фокусировать одну цель").get() && (target == null || !this.isValid(target)) || !(Boolean) options.getValueByName("Фокусировать одну цель").get()) { this.updateTarget(); } if (target == null) { this.stopWatch.setLastMS(0L); this.reset(); return; } this.isRotated = false; if (this.shouldPlayerFalling() && this.stopWatch.hasTimeElapsed()) { this.updateAttack(); this.ticks = 2; } if (this.type.is("Резкая")) { if (this.ticks > 0) { this.updateRotation(true, 180.0F, 90.0F); --this.ticks; } else { this.reset(); } } else if (!this.isRotated) { this.updateRotation(false, 115.0F, 60.0F); } } @Subscribe private void onWalking(EventMotion e) { if (target == null || (this.autoPotion.isState() && this.autoPotion.isActive())) return; float yaw = rotateVector.x; float pitch = rotateVector.y; e.setYaw(yaw); e.setPitch(pitch); mc.player.rotationYawHead = yaw; mc.player.renderYawOffset = yaw; mc.player.rotationPitchHead = pitch; } private void updateTarget() { List<LivingEntity> targets = new ArrayList<>(); for (Entity entity : mc.world.getAllEntities()) { if (!(entity instanceof LivingEntity living)) continue; if (!this.isValid(living)) continue; targets.add(living); } if (targets.isEmpty()) { target = null; return; } if (targets.size() == 1) { target = targets.get(0); return; } targets.sort(Comparator.comparingDouble(entity -> Calculator.entity( entity, consider.getValueByName("Хп").get(), consider.getValueByName("Броню").get(), consider.getValueByName("Дистанцию").get(), attackDistance() + rotationRange.get() + (mc.player.isElytraFlying() ? elytraRotation.get() : 0.0), consider.getValueByName("Баффы").get() ))); target = targets.get(0); } private void updateRotation(boolean attack, float rotationYawSpeed, float rotationPitchSpeed) { float yawToTarget; float pitchToTarget; if (pearlVector == null) { Vector3d vec = target.getPositionVec().add(0.0, MathHelper.clamp(mc.player.getPosYEye() - target.getPosY(), 0.0, (double) target.getHeight() * (mc.player.getDistanceEyePos(target) / attackDistance())), 0.0).subtract(mc.player.getEyePosition(1.0F)); this.isRotated = true; yawToTarget = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0); pitchToTarget = (float) (-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z)))); } else { this.isRotated = true; yawToTarget = pearlVector.x; pitchToTarget = pearlVector.y; } float yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x); float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y); int roundedYaw = (int) yawDelta; float gcd = SensUtils.getGCDValue(); float clampedYaw; float clampedPitch; float yaw; float pitch; if (type.is("Плавная") && pearlVector == null) { clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 1.0F), rotationYawSpeed); clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 1.0F), rotationPitchSpeed); if (attack && this.selected != target && options.getValueByName("Ускорять ротацию при атаке").get()) { clampedPitch = Math.max(Math.abs(pitchDelta), 1.0F); clampedYaw = Math.max(Math.abs(yawDelta), 1.0F); } else { clampedPitch /= 3.0F; } if (Math.abs(clampedYaw - this.lastYaw) <= 3.0F) { clampedYaw = this.lastYaw + 3.3F; } yaw = rotateVector.x + (yawDelta > 0.0F ? clampedYaw : -clampedYaw); pitch = MathHelper.clamp(rotateVector.y + (pitchDelta > 0.0F ? clampedPitch : -clampedPitch), -89.0F, 89.0F); yaw -= (yaw - rotateVector.x) % gcd; pitch -= (pitch - rotateVector.y) % gcd; rotateVector = new Vector2f(yaw, pitch); this.lastYaw = clampedYaw; this.lastPitch = clampedPitch; } else if (type.is("Резкая") || pearlVector != null) { yaw = rotateVector.x + (float) roundedYaw; pitch = MathHelper.clamp(rotateVector.y + pitchDelta, -90.0F, 90.0F); yaw -= (yaw - rotateVector.x) % gcd; pitch -= (pitch - rotateVector.y) % gcd; rotateVector = new Vector2f(yaw, pitch); } else yaw = mc.player.rotationYaw; if (options.getValueByName("Коррекция движения").get()) mc.player.rotationYawOffset = yaw; } private boolean canSeeThroughWall(Entity entity) { return mc.world.rayTraceBlocks(new RayTraceContext( mc.player.getEyePosition(1.0F), entity.getEyePosition(1.0F), RayTraceContext.BlockMode.COLLIDER, RayTraceContext.FluidMode.NONE, mc.player) ).getType() == RayTraceResult.Type.MISS; } private void updateAttack() { if (this.noAttackIfEat.get() && mc.player.isHandActive()) return; this.selected = MouseUtil.getMouseOver(target, rotateVector.x, rotateVector.y, this.attackDistance()); if ((selected == null || selected != target) && !mc.player.isElytraFlying()) return; if (options.getValueByName("Ускорять ротацию при атаке").get()) { this.updateRotation(true, 40.0F, 45.0F); } if (target.getDistance(mc.player) > attackDistance()) return; if (mc.player.isBlocking() && options.getValueByName("Отжимать щит").get()) mc.playerController.onStoppedUsingItem(mc.player); if (target instanceof PlayerEntity player && player.isBlocking() && options.getValueByName("Ломать щит").get()) { int hbSlot = InventoryUtil.getInstance().getAxeInInventory(true); int invSlot = InventoryUtil.getInstance().getAxeInInventory(false); int slot = breakShieldPlayer(player, hbSlot, invSlot); if (slot > 8) mc.playerController.pickItem(slot); } this.stopWatch.setLastMS(550L); mc.playerController.attackEntity(mc.player, target); mc.player.swingArm(Hand.MAIN_HAND); } private double attackDistance() { if (options.getValueByName("Оптимальная дистанция атаки").get() && !mc.player.isSwimming()) { return 3.6f; } if (mc.player.isSwimming()) { return 3.0f; } return attackRange.get(); } private boolean shouldPlayerFalling() { return AttackUtil.isPlayerFalling(true, this.onlySpace.get(), options.getValueByName("Синхронизация с TPS").get()); } public static Vector3d getVector(LivingEntity target) { double wHalf = target.getWidth() / 2.0F; double yExpand = MathHelper.clamp(target.getPosYEye() - target.getPosY(), 0.0, target.getHeight()); double xExpand = MathHelper.clamp(mc.player.getPosX() - target.getPosX(), -wHalf, wHalf); double zExpand = MathHelper.clamp(mc.player.getPosZ() - target.getPosZ(), -wHalf, wHalf); return new Vector3d(target.getPosX() - mc.player.getPosX() + xExpand, target.getPosY() - mc.player.getPosYEye() + yExpand, target.getPosZ() - mc.player.getPosZ() + zExpand); } private double getDistance(LivingEntity entity) { return getVector(entity).length(); } private boolean isValid(LivingEntity entity) { if (!this.wallCheck.get() && !this.canSeeThroughWall(entity)) return false; if (entity instanceof ClientPlayerEntity) return false; if (entity.ticksExisted < 3) return false; if (entity instanceof PlayerEntity p) { if (AntiBot.checkBot(entity)) return false; if (!this.targets.getValueByName("Друзья").get() && FriendStorage.isFriend(p.getName().getString())) return false; if (p.getName().getString().equalsIgnoreCase(mc.player.getName().getString())) return false; } if (entity instanceof PlayerEntity && !(Boolean) this.targets.getValueByName("Игроки").get()) return false; if (entity instanceof PlayerEntity && entity.getTotalArmorValue() == 0 && !(Boolean) this.targets.getValueByName("Голые").get()) return false; if (entity instanceof MonsterEntity && !(Boolean) this.targets.getValueByName("Мобы").get() || entity instanceof PhantomEntity && !(Boolean) this.targets.getValueByName("Мобы").get()) return false; if (entity instanceof AnimalEntity && !(Boolean) this.targets.getValueByName("Животные").get()) return false; if (entity instanceof VillagerEntity || entity instanceof ArmorStandEntity) return false; if (entity.isInvulnerable() || !entity.isAlive()) return false; double maxDistance = attackDistance() + rotationRange.get(); if (mc.player.isElytraFlying()) maxDistance += elytraRotation.get(); return this.getDistance(entity) <= maxDistance; } InventoryUtil.Hand handUtil = new InventoryUtil.Hand(); private int breakShieldPlayer(PlayerEntity entity, int hbSlot, int invSlot) { if (hbSlot != -1) { this.handUtil.setOriginalSlot(mc.player.inventory.currentItem); mc.player.connection.sendPacket(new CHeldItemChangePacket(hbSlot)); mc.playerController.attackEntity(mc.player, entity); mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem)); return hbSlot; } if (invSlot != -1) { handUtil.setOriginalSlot(mc.player.inventory.currentItem); mc.playerController.pickItem(invSlot); mc.playerController.attackEntity(mc.player, entity); if (InventoryUtil.findEmptySlot(true) != -1) mc.playerController.pickItem(invSlot); mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem)); return invSlot; } return -1; } private void reset() { if (options.getValueByName("Коррекция движения").get()) { mc.player.rotationYawOffset = -2.14748365E9F; } rotateVector = new Vector2f(mc.player.rotationYaw, mc.player.rotationPitch); } public void onEnable() { super.onEnable(); this.reset(); target = null; pearlVector = null; } public void onDisable() { super.onDisable(); this.reset(); this.stopWatch.setLastMS(0L); target = null; } }
) я специально апнул тему/del удаляй
спиздил
могу дать код калькулятор ток скажи куда его вставлять и тдДАЙ КАЛЬКУЛЯТОР БЛЯ
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz