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

Вопрос Аура пукитайм (дуели)

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
3 Дек 2025
Сообщения
113
Реакции
0
всем привет я фрик который делает ауру под пукитайм дуели, клауд 4.6 делал мультипоинты ибо я нихуя не умею


МУСОР:
Expand Collapse Copy
package hui.pizda.api.utils.rotation.rotations;

import net.minecraft.entity.Entity;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import hui.pizda.api.utils.combat.ClickScheduler;
import hui.pizda.api.utils.math.MathUtil;
import hui.pizda.api.utils.rotation.RotationUtil;
import hui.pizda.api.utils.rotation.manager.Rotation;
import hui.pizda.api.utils.rotation.manager.RotationMode;

import java.util.Random;
public class SpookyTimeRotation extends RotationMode {

    private final ClickScheduler clickScheduler;
    private final Random random = new Random();

    private Entity currentTarget = null;
    private int ticksOnTarget = 0;
    private Vec3d currentAimOffset = Vec3d.ZERO;
    private Vec3d targetAimOffset = Vec3d.ZERO;
    private int ticksToNextPoint = 0;
    private float smoothSpeed = 0f;
    private float noisePhase1 = 0f;
    private float noisePhase2 = 0f;
    private float noiseSpeed1 = 0.4f;
    private float noiseSpeed2 = 0.9f;
    private float noiseAmpYaw = 1.8f;
    private float noiseAmpPitch = 0.9f;
    private float smoothNoiseYaw = 0f;
    private float smoothNoisePitch = 0f;
    private float yawSpeedMax = 28f;
    private float pitchSpeedMax = 14f;

    public SpookyTimeRotation(ClickScheduler clickScheduler) {
        super("Spooky Time");
        this.clickScheduler = clickScheduler;
        randomizeProfile();
    }

    private void randomizeProfile() {
        noiseSpeed1 = MathUtil.randomInRange(0.3f, 0.6f);
        noiseSpeed2 = MathUtil.randomInRange(0.65f, 1.2f);
        noiseAmpYaw = MathUtil.randomInRange(1.2f, 2.8f);
        noiseAmpPitch = MathUtil.randomInRange(0.5f, 1.4f);
        yawSpeedMax = MathUtil.randomInRange(22f, 35f);
        pitchSpeedMax = MathUtil.randomInRange(10f, 18f);
    }

    @Override
    public Rotation process(Rotation current, Rotation target, Vec3d vec3d, Entity entity) {
        if (entity == null) {
            currentTarget = null;
            ticksOnTarget = 0;
            return smoothReturnToPlayer(current, target);
        }
        if (currentTarget != entity) {
            currentTarget = entity;
            ticksOnTarget = 0;
            randomizeProfile();
            pickNewPoint(entity);
            ticksToNextPoint = MathUtil.randomInRange(8, 18);
        }

        noisePhase1 += noiseSpeed1;
        noisePhase2 += noiseSpeed2;

        ticksToNextPoint--;
        if (ticksToNextPoint <= 0) {
            pickNewPoint(entity);
            ticksToNextPoint = MathUtil.randomInRange(8, 18);
        }
        currentAimOffset = lerpVec(currentAimOffset, targetAimOffset, MathUtil.randomInRange(0.12f, 0.22f));
        Rotation desired = getAimRotation(entity);

        float diffYaw = MathHelper.wrapDegrees(desired.getYaw() - current.getYaw());
        float diffPitch = desired.getPitch() - current.getPitch();
        float totalDelta = (float) Math.hypot(diffYaw, diffPitch);

        boolean isClose = totalDelta < 5f;
        if (isClose)
            ticksOnTarget++;
        else
            ticksOnTarget = Math.max(0, ticksOnTarget - 1);
        float norm = MathHelper.clamp(totalDelta / 50f, 0f, 1f);
        float easeOut = 1f - (1f - norm) * (1f - norm) * (1f - norm);
        float desiredSpeed = MathHelper.clamp(easeOut, 0.05f, 1f);

        if (isClose && ticksOnTarget > 20) {
            desiredSpeed *= Math.max(0.3f, 1f - (ticksOnTarget - 20) * 0.012f);
        }

        smoothSpeed = MathUtil.interpolate(smoothSpeed, desiredSpeed, 0.2f);

        float yawStep = yawSpeedMax * smoothSpeed * MathUtil.randomInRange(0.92f, 1.08f);
        float pitchStep = pitchSpeedMax * smoothSpeed * MathUtil.randomInRange(0.92f, 1.08f);

        float moveYaw = MathHelper.clamp(diffYaw, -yawStep, yawStep);
        float movePitch = MathHelper.clamp(diffPitch, -pitchStep, pitchStep);
        float rawNoiseYaw = MathHelper.sin(noisePhase1) * noiseAmpYaw
                + MathHelper.sin(noisePhase2 * 1.6f) * (noiseAmpYaw * 0.35f)
                + (float) (random.nextGaussian() * 0.25f);
        float rawNoisePitch = MathHelper.sin(noisePhase1 * 0.7f + 1.3f) * noiseAmpPitch
                + (float) (random.nextGaussian() * 0.15f);

        smoothNoiseYaw = MathUtil.interpolate(smoothNoiseYaw, rawNoiseYaw, 0.3f);
        smoothNoisePitch = MathUtil.interpolate(smoothNoisePitch, rawNoisePitch, 0.3f);
        float noiseMult = isClose ? 1f : MathHelper.clamp(1f - totalDelta / 25f, 0.15f, 0.6f);
        moveYaw += smoothNoiseYaw * noiseMult;
        movePitch += smoothNoisePitch * noiseMult;

        float finalYaw = current.getYaw() + moveYaw;
        float finalPitch = MathHelper.clamp(current.getPitch() + movePitch, -90f, 90f);

        return new Rotation(finalYaw, finalPitch);
    }

    private void pickNewPoint(Entity entity) {
        Box box = entity.getBoundingBox();
        double w = box.getLengthX();
        double h = box.getLengthY();
        double d = box.getLengthZ();
        double rx = (random.nextGaussian() * 0.2) * w;
        double ry = h * MathUtil.randomInRange(0.45f, 0.85f);
        double rz = (random.nextGaussian() * 0.2) * d;

        targetAimOffset = new Vec3d(rx, ry, rz);
    }

    private Rotation getAimRotation(Entity entity) {
        Vec3d pos = entity.getPos().add(currentAimOffset);
        Box box = entity.getBoundingBox();
        pos = new Vec3d(
                MathHelper.clamp(pos.x, box.minX + 0.02, box.maxX - 0.02),
                MathHelper.clamp(pos.y, box.minY + 0.02, box.maxY - 0.02),
                MathHelper.clamp(pos.z, box.minZ + 0.02, box.maxZ - 0.02));
        return RotationUtil.rotationAt(pos);
    }
    private Rotation smoothReturnToPlayer(Rotation current, Rotation target) {
        float diffYaw = MathHelper.wrapDegrees(target.getYaw() - current.getYaw());
        float diffPitch = target.getPitch() - current.getPitch();
        float rotDiff = (float) Math.hypot(diffYaw, diffPitch);
        if (rotDiff < 0.5f)
            return target;
        float norm = MathHelper.clamp(rotDiff / 45f, 0f, 1f);
        float ease = 1f - (1f - norm) * (1f - norm) * (1f - norm);
        float speed = MathHelper.clamp(ease, 0.06f, 1f);
        float yStep = yawSpeedMax * speed;
        float pStep = pitchSpeedMax * speed;
        return new Rotation(
                current.getYaw() + MathHelper.clamp(diffYaw, -yStep, yStep),
                MathHelper.clamp(current.getPitch() + MathHelper.clamp(diffPitch, -pStep, pStep), -90f, 90f));
    }

    private Vec3d lerpVec(Vec3d a, Vec3d b, float t) {
        return new Vec3d(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t);
    }

    public void onAttack(Entity entity) {
        if (entity != null) {
            currentTarget = entity;
            noisePhase1 += MathUtil.randomInRange(1f, 3f);
            pickNewPoint(entity);
            ticksToNextPoint = MathUtil.randomInRange(8, 18);
        }
    }

    public void reset() {
        currentTarget = null;
        ticksOnTarget = 0;
        smoothSpeed = 0f;
        noisePhase1 = noisePhase2 = 0f;
        smoothNoiseYaw = smoothNoisePitch = 0f;
        currentAimOffset = targetAimOffset = Vec3d.ZERO;
        randomizeProfile();
    }
}

бегал на дуелях 10 минут и тока потом забанило, скажите паже что там начал спуки блять детектить я не пойму сука
 
пофиксил под грим, варнилось за модуль360 но все равно банится
Тряску добавь, и мультипоинты по нормальному плавные. Еще модешь плавный отвод попробовать сделать(при потере цели)
 
Тряску добавь, и мультипоинты по нормальному плавные. Еще модешь плавный отвод попробовать сделать(при потере цели)
тряска есть, как именно мультипоинты сделать?
 
Назад
Сверху Снизу