Розыгрыш Premium и Уникальной юзергруппы на форуме! Перейти

Обход античита HW Rotation | Maby bypass

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
6 Окт 2024
Сообщения
224
Реакции
0
Выберите загрузчик игры
  1. Прочие моды
Сделал ротку для холика хз будет ли байпасить

Code:
Пожалуйста, авторизуйтесь для просмотра ссылки.

Сигмабапас123:
Expand Collapse Copy
    private void холикСнапRotation() {
        if (target == null) return;

        Vector3d effectivePos = getEffectiveTargetPosition();
        if (effectivePos != null) {
            effectivePos = effectivePos.add(0, target.getHeight() / 2.0F, 0);
        } else {
            effectivePos = target.getPositionVec().add(0, target.getHeight() / 2.0F, 0);
        }

        Vector3d eyePos = mc.player.getEyePosition(mc.getRenderPartialTicks());
        Vector3d vecToTarget = effectivePos.subtract(eyePos);

        float targetYaw = (float) Math.toDegrees(Math.atan2(-vecToTarget.x, vecToTarget.z));
        float targetPitch = (float) MathHelper.clamp(-Math.toDegrees(Math.atan2(vecToTarget.y, Math.hypot(vecToTarget.x, vecToTarget.z))), -90F, 90F);

        float smoothFactor = 6.0F;
        float currentYaw = mc.player.rotationYaw;
        float currentPitch = mc.player.rotationPitch;

        float deltaYaw = MathHelper.wrapDegrees(targetYaw - currentYaw);
        float deltaPitch = targetPitch - currentPitch;

        float smoothYaw = currentYaw + (deltaYaw / smoothFactor);
        float smoothPitch = currentPitch + (deltaPitch / smoothFactor);

        smoothPitch = MathHelper.clamp(smoothPitch, -90F, 90F);

        RotationComponent.update(new Rotation(smoothYaw, smoothPitch), 360, 360, 0, 5);
    }

И да на ss звука нет потомучто мне было лень ассеты загружать
Если нужны методы пишите
 
Сделал ротку для холика хз будет ли байпасить

Code:
Пожалуйста, авторизуйтесь для просмотра ссылки.

Сигмабапас123:
Expand Collapse Copy
    private void холикСнапRotation() {
        if (target == null) return;

        Vector3d effectivePos = getEffectiveTargetPosition();
        if (effectivePos != null) {
            effectivePos = effectivePos.add(0, target.getHeight() / 2.0F, 0);
        } else {
            effectivePos = target.getPositionVec().add(0, target.getHeight() / 2.0F, 0);
        }

        Vector3d eyePos = mc.player.getEyePosition(mc.getRenderPartialTicks());
        Vector3d vecToTarget = effectivePos.subtract(eyePos);

        float targetYaw = (float) Math.toDegrees(Math.atan2(-vecToTarget.x, vecToTarget.z));
        float targetPitch = (float) MathHelper.clamp(-Math.toDegrees(Math.atan2(vecToTarget.y, Math.hypot(vecToTarget.x, vecToTarget.z))), -90F, 90F);

        float smoothFactor = 6.0F;
        float currentYaw = mc.player.rotationYaw;
        float currentPitch = mc.player.rotationPitch;

        float deltaYaw = MathHelper.wrapDegrees(targetYaw - currentYaw);
        float deltaPitch = targetPitch - currentPitch;

        float smoothYaw = currentYaw + (deltaYaw / smoothFactor);
        float smoothPitch = currentPitch + (deltaPitch / smoothFactor);

        smoothPitch = MathHelper.clamp(smoothPitch, -90F, 90F);

        RotationComponent.update(new Rotation(smoothYaw, smoothPitch), 360, 360, 0, 5);
    }

И да на ss звука нет потомучто мне было лень ассеты загружать
Если нужны методы пишите
ничесе тему быстро приняли
Точна???
 
Сделал ротку для холика хз будет ли байпасить

Code:
Пожалуйста, авторизуйтесь для просмотра ссылки.

Сигмабапас123:
Expand Collapse Copy
    private void холикСнапRotation() {
        if (target == null) return;

        Vector3d effectivePos = getEffectiveTargetPosition();
        if (effectivePos != null) {
            effectivePos = effectivePos.add(0, target.getHeight() / 2.0F, 0);
        } else {
            effectivePos = target.getPositionVec().add(0, target.getHeight() / 2.0F, 0);
        }

        Vector3d eyePos = mc.player.getEyePosition(mc.getRenderPartialTicks());
        Vector3d vecToTarget = effectivePos.subtract(eyePos);

        float targetYaw = (float) Math.toDegrees(Math.atan2(-vecToTarget.x, vecToTarget.z));
        float targetPitch = (float) MathHelper.clamp(-Math.toDegrees(Math.atan2(vecToTarget.y, Math.hypot(vecToTarget.x, vecToTarget.z))), -90F, 90F);

        float smoothFactor = 6.0F;
        float currentYaw = mc.player.rotationYaw;
        float currentPitch = mc.player.rotationPitch;

        float deltaYaw = MathHelper.wrapDegrees(targetYaw - currentYaw);
        float deltaPitch = targetPitch - currentPitch;

        float smoothYaw = currentYaw + (deltaYaw / smoothFactor);
        float smoothPitch = currentPitch + (deltaPitch / smoothFactor);

        smoothPitch = MathHelper.clamp(smoothPitch, -90F, 90F);

        RotationComponent.update(new Rotation(smoothYaw, smoothPitch), 360, 360, 0, 5);
    }

И да на ss звука нет потомучто мне было лень ассеты загружать
Если нужны методы пишите
от того что ты сделал smoothFactor ротация не станет обходить (
 
от того что ты сделал smoothFactor ротация не станет обходить (
1767277217275.png
 
Сделал ротку для холика хз будет ли байпасить

Code:
Пожалуйста, авторизуйтесь для просмотра ссылки.

Сигмабапас123:
Expand Collapse Copy
    private void холикСнапRotation() {
        if (target == null) return;

        Vector3d effectivePos = getEffectiveTargetPosition();
        if (effectivePos != null) {
            effectivePos = effectivePos.add(0, target.getHeight() / 2.0F, 0);
        } else {
            effectivePos = target.getPositionVec().add(0, target.getHeight() / 2.0F, 0);
        }

        Vector3d eyePos = mc.player.getEyePosition(mc.getRenderPartialTicks());
        Vector3d vecToTarget = effectivePos.subtract(eyePos);

        float targetYaw = (float) Math.toDegrees(Math.atan2(-vecToTarget.x, vecToTarget.z));
        float targetPitch = (float) MathHelper.clamp(-Math.toDegrees(Math.atan2(vecToTarget.y, Math.hypot(vecToTarget.x, vecToTarget.z))), -90F, 90F);

        float smoothFactor = 6.0F;
        float currentYaw = mc.player.rotationYaw;
        float currentPitch = mc.player.rotationPitch;

        float deltaYaw = MathHelper.wrapDegrees(targetYaw - currentYaw);
        float deltaPitch = targetPitch - currentPitch;

        float smoothYaw = currentYaw + (deltaYaw / smoothFactor);
        float smoothPitch = currentPitch + (deltaPitch / smoothFactor);

        smoothPitch = MathHelper.clamp(smoothPitch, -90F, 90F);

        RotationComponent.update(new Rotation(smoothYaw, smoothPitch), 360, 360, 0, 5);
    }

И да на ss звука нет потомучто мне было лень ассеты загружать
Если нужны методы пишите
дай getEffectiveTargetPosition RotationComponent Rotation
 
дай getEffectiveTargetPosition RotationComponent Rotation
123:
Expand Collapse Copy
    private Vector3d getEffectiveTargetPosition() {
        if (target == null) return null;

        return target.getPositionVec();
    }
1234:
Expand Collapse Copy
package ru.alekdlc.client.managers.component.impl.rotation;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import net.minecraft.util.math.MathHelper;
import ru.alekdlc.client.api.events.orbit.EventHandler;
import ru.alekdlc.client.managers.component.Component;
import ru.alekdlc.client.managers.events.player.MoveInputEvent;
import ru.alekdlc.client.managers.events.player.UpdateEvent;
import ru.alekdlc.client.managers.module.impl.combat.KillAura;
import ru.alekdlc.client.managers.module.impl.combat.TargetStrafe;
import ru.alekdlc.client.utils.other.Instance;
import ru.alekdlc.client.utils.player.MoveUtil;
import ru.alekdlc.client.utils.rotation.SensUtil;

@Getter
@Setter
@Accessors(fluent = true)
public class RotationComponent extends Component {
    public static RotationComponent getInstance() {
        return Instance.getComponent(RotationComponent.class);
    }

    private RotationTask currentTask = RotationTask.IDLE;
    private float currentYawSpeed;
    private float currentPitchSpeed;
    private float currentYawReturnSpeed;
    private float currentPitchReturnSpeed;
    private int currentPriority;
    private int currentTimeout;
    private int idleTicks;
    private Rotation targetRotation;

    @EventHandler
    public void onEvent(MoveInputEvent event) {
        // Получаем экземпляры KillAura и TargetStrafe
        final KillAura killAura = KillAura.getInstance();
        final TargetStrafe targetStrafe = TargetStrafe.getInstance();

        // Проверяем, активна ли ротация и включена ли KillAura
        if (isRotating() && killAura != null && killAura.isEnabled()) {
            // Если TargetStrafe включен, используем ротацию игрока для коррекции
            if (targetStrafe != null && targetStrafe.isEnabled()) {
                MoveUtil.fixMovement(event, mc.player.rotationYaw);
            }
            // Если режим "Свободная" и TargetStrafe выключен, используем FreeLook
            else if (killAura.correctionMode().is("Свободная")) {
                MoveUtil.fixMovement(event, MathHelper.wrapDegrees(mc.gameRenderer.getActiveRenderInfo().getYaw()));
            }
        }
    }

    private void resetRotation() {
        Rotation targetRotation = new Rotation(FreeLookComponent.getFreeYaw(), FreeLookComponent.getFreePitch());
        if (updateRotation(targetRotation, currentYawReturnSpeed(), currentPitchReturnSpeed())) {
            stopRotation();
        }
    }

    @EventHandler
    public void onEvent(UpdateEvent event) {
        if (currentTask().equals(RotationTask.AIM) && idleTicks() > currentTimeout()) {
            currentTask(RotationTask.RESET);
        }

        if (currentTask().equals(RotationTask.RESET)) {
            resetRotation();
        }
        idleTicks++;
    }

    public static void update(Rotation target, float yawSpeed, float pitchSpeed, float yawReturnSpeed, float pitchReturnSpeed, int timeout, int priority, boolean clientRotation) {
        final RotationComponent instance = RotationComponent.getInstance();
        if (instance.currentPriority() > priority) {
            return;
        }

        if (instance.currentTask().equals(RotationTask.IDLE) && !clientRotation) {
            FreeLookComponent.setActive(true);
        }

        instance.currentYawSpeed(yawSpeed);
        instance.currentPitchSpeed(pitchSpeed);
        instance.currentYawReturnSpeed(yawReturnSpeed);
        instance.currentPitchReturnSpeed(pitchReturnSpeed);
        instance.currentTimeout(timeout);
        instance.currentPriority(priority);
        instance.currentTask(RotationTask.AIM);
        instance.targetRotation(target);

        instance.updateRotation(target, yawSpeed, pitchSpeed);
    }

    public static void update(Rotation targetRotation, float turnSpeed, float returnSpeed, int timeout, int priority) {
        update(targetRotation, turnSpeed, turnSpeed, returnSpeed, returnSpeed, timeout, priority, false);
    }

    private boolean updateRotation(Rotation targetRotation, float yawSpeed, float pitchSpeed) {
        if (mc.player == null) return false;

        Rotation currentRotation = new Rotation(mc.player);
        float yawDelta = MathHelper.wrapDegrees(targetRotation.getYaw() - currentRotation.getYaw());
        float pitchDelta = targetRotation.getPitch() - currentRotation.getPitch();

        float clampedYaw = Math.min(Math.abs(yawDelta), yawSpeed);
        float clampedPitch = Math.min(Math.abs(pitchDelta), pitchSpeed);

        mc.player.rotationYaw += SensUtil.getSens(MathHelper.clamp(yawDelta, -clampedYaw, clampedYaw));
        mc.player.rotationPitch = MathHelper.clamp(mc.player.rotationPitch + SensUtil.getSens(MathHelper.clamp(pitchDelta, -clampedPitch, clampedPitch)), -90F, 90F);

        idleTicks(0);
        return new Rotation(mc.player).getDelta(targetRotation) < 1F;
    }

    public void stopRotation() {
        currentTask(RotationTask.IDLE);
        currentPriority(0);
        if (!SmoothRotationComponent.getInstance().isRotating()) {
            FreeLookComponent.setActive(false);
        }
    }

    public boolean isRotating() {
        return !currentTask.equals(RotationTask.IDLE);
    }

    public enum RotationTask {
        AIM,
        RESET,
        IDLE
    }
}


12345:
Expand Collapse Copy
package ru.alekdlc.client.managers.component.impl.rotation;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;
import ru.alekdlc.client.api.interfaces.IMinecraft;
import org.joml.Vector2f;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Rotation implements IMinecraft {
    private float yaw, pitch;

    public Rotation(Entity entity) {
        yaw = entity.rotationYaw;
        pitch = entity.rotationPitch;
    }

    public float getDelta(Rotation target) {
        float yawDelta = MathHelper.wrapDegrees(target.getYaw() - this.yaw);
        float pitchDelta = target.getPitch() - this.pitch;
        return (float) Math.hypot(Math.abs(yawDelta), Math.abs(pitchDelta));
    }

    public double getDeltaDouble(Rotation target) {
        double yawDelta = MathHelper.wrapDegrees(target.getYaw() - yaw);
        double pitchDelta = MathHelper.wrapDegrees(target.getPitch() - pitch);
        return Math.hypot(yawDelta, pitchDelta);
    }

    public static Vector2f camera() {
        return new Vector2f(cameraYaw(), cameraPitch());
    }

    public static float cameraYaw() {
        return MathHelper.wrapDegrees(mc.gameRenderer.getActiveRenderInfo().getYaw() + (mc.gameRenderer.getActiveRenderInfo().isThirdPersonReverse() ? 180 : 0));
    }

    public static float cameraPitch() {
        return (mc.gameRenderer.getActiveRenderInfo().isThirdPersonReverse() ? -1 : 1) * mc.gameRenderer.getActiveRenderInfo().getPitch();
    }
}
Реально? проверил?
 
Назад
Сверху Снизу