Исходник AimAssist для ваших паст | Expensive 3.1

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

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

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

Спасибо!

code :


AimAssist (LeyderClient):
// by layderdlc (супер кринж аим ассист)
package im.expensive.module.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.expensive.command.friends.FriendStorage;
import im.expensive.events.EventPacket;
import im.expensive.events.EventUpdate;
import im.expensive.module.api.Category;
import im.expensive.module.api.Function;
import im.expensive.module.api.FunctionRegister;
import im.expensive.module.settings.impl.BooleanSetting;
import im.expensive.module.settings.impl.SliderSetting;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.play.client.CUseEntityPacket;
import net.minecraft.util.math.MathHelper;

@FunctionRegister(name = "AimAssist", type = Category.Combat, description = "AimAssist , LeyderClient dev: slader", category = Category.Combat)
public class AimAssist extends Function {

    private final SliderSetting distanceSetting = new SliderSetting("Distance", 5.0f, 2.0f, 7.0f, 0.1f, 30);
    private final SliderSetting yawSpeedSetting = new SliderSetting("Yaw Speed", 30.0f, 0.0f, 100.0f, 1.0f, 30);
    private final SliderSetting pitchSpeedSetting = new SliderSetting("Pitch Speed", 15.0f, 0.0f, 100.0f, 1.0f, 30); 
    private final BooleanSetting targetFriendsSetting = new BooleanSetting("Таргетить друзей", false);
    private final BooleanSetting targetInvisibleSetting = new BooleanSetting("Таргетить инвизок", false);

    private PlayerEntity currentTarget;
    private static final Minecraft mc = Minecraft.getInstance();

    public AimAssist() {
        addSettings(distanceSetting, yawSpeedSetting, pitchSpeedSetting, targetFriendsSetting, targetInvisibleSetting);
    }

    @Subscribe
    public void onPacket(EventPacket event) {
        if (event.getPacket() instanceof CUseEntityPacket) {
            CUseEntityPacket packet = (CUseEntityPacket) event.getPacket();
            Entity targetEntity = packet.getEntityFromWorld(mc.world);
            if (targetEntity instanceof PlayerEntity) {
                currentTarget = (PlayerEntity) targetEntity;
            }
        }
    }
// by slader
    @Subscribe
    public void onUpdate(EventUpdate event) {
        if (currentTarget != null) {
            if (mc.player.getDistance(currentTarget) <= distanceSetting.get()) {
                float[] targetRotations = calculateRotations(currentTarget);
                mc.player.rotationYaw = smoothRotation(mc.player.rotationYaw, targetRotations[0], yawSpeedSetting.get() / 200.0f);
                mc.player.rotationPitch = smoothRotation(mc.player.rotationPitch, targetRotations[1], pitchSpeedSetting.get() / 200.0f); 
            } else {
                currentTarget = null;
            }
        } else {
            currentTarget = findClosestPlayer();
        }
    }

    private PlayerEntity findClosestPlayer() {
        PlayerEntity closestPlayer = null;
        double closestDistanceSq = Double.MAX_VALUE;
        for (PlayerEntity player : mc.world.getPlayers()) {
            if (player != mc.player && (!FriendStorage.isFriend(player.getName().getString()) || targetFriendsSetting.get()) && (!player.isInvisible() || targetInvisibleSetting.get())) {
                double distanceSq = mc.player.getDistanceSq(player);
                if (distanceSq < closestDistanceSq && distanceSq <= distanceSetting.get() * distanceSetting.get()) {
                    closestPlayer = player;
                    closestDistanceSq = distanceSq;
                }
            }
        }
        return closestPlayer;
    }

    private float[] calculateRotations(Entity entity) {
        double x = entity.getPosX() - mc.player.getPosX();
        double y = entity.getPosY() - mc.player.getPosY() + entity.getEyeHeight() - mc.player.getEyeHeight();
        double z = entity.getPosZ() - mc.player.getPosZ();
        double dist = Math.sqrt(x * x + z * z);
        float yaw = (float) ((Math.atan2(z, x) * 180 / Math.PI) - 90);
        float pitch = (float) (-(Math.atan2(y, dist) * 180 / Math.PI));
        return new float[]{yaw, pitch};
    }

    private float smoothRotation(float current, float target, float factor) {
        float delta = MathHelper.wrapDegrees(target - current);

        float minRotation = 0.01f;

        float rotation = delta * factor; // ну кароч полный кринж ,на фт кстати урон не урезает пользуйтесь

        if (Math.abs(rotation) < minRotation) {
            rotation = Math.copySign(minRotation, rotation);
        }

        return current + rotation;
    }
}
// ну вот и все
 
Начинающий
Статус
Оффлайн
Регистрация
6 Июл 2024
Сообщения
63
Реакции[?]
2
Поинты[?]
1K
code :


AimAssist (LeyderClient):
// by layderdlc (супер кринж аим ассист)
package im.expensive.module.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.expensive.command.friends.FriendStorage;
import im.expensive.events.EventPacket;
import im.expensive.events.EventUpdate;
import im.expensive.module.api.Category;
import im.expensive.module.api.Function;
import im.expensive.module.api.FunctionRegister;
import im.expensive.module.settings.impl.BooleanSetting;
import im.expensive.module.settings.impl.SliderSetting;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.play.client.CUseEntityPacket;
import net.minecraft.util.math.MathHelper;

@FunctionRegister(name = "AimAssist", type = Category.Combat, description = "AimAssist , LeyderClient dev: slader", category = Category.Combat)
public class AimAssist extends Function {

    private final SliderSetting distanceSetting = new SliderSetting("Distance", 5.0f, 2.0f, 7.0f, 0.1f, 30);
    private final SliderSetting yawSpeedSetting = new SliderSetting("Yaw Speed", 30.0f, 0.0f, 100.0f, 1.0f, 30);
    private final SliderSetting pitchSpeedSetting = new SliderSetting("Pitch Speed", 15.0f, 0.0f, 100.0f, 1.0f, 30);
    private final BooleanSetting targetFriendsSetting = new BooleanSetting("Таргетить друзей", false);
    private final BooleanSetting targetInvisibleSetting = new BooleanSetting("Таргетить инвизок", false);

    private PlayerEntity currentTarget;
    private static final Minecraft mc = Minecraft.getInstance();

    public AimAssist() {
        addSettings(distanceSetting, yawSpeedSetting, pitchSpeedSetting, targetFriendsSetting, targetInvisibleSetting);
    }

    @Subscribe
    public void onPacket(EventPacket event) {
        if (event.getPacket() instanceof CUseEntityPacket) {
            CUseEntityPacket packet = (CUseEntityPacket) event.getPacket();
            Entity targetEntity = packet.getEntityFromWorld(mc.world);
            if (targetEntity instanceof PlayerEntity) {
                currentTarget = (PlayerEntity) targetEntity;
            }
        }
    }
// by slader
    @Subscribe
    public void onUpdate(EventUpdate event) {
        if (currentTarget != null) {
            if (mc.player.getDistance(currentTarget) <= distanceSetting.get()) {
                float[] targetRotations = calculateRotations(currentTarget);
                mc.player.rotationYaw = smoothRotation(mc.player.rotationYaw, targetRotations[0], yawSpeedSetting.get() / 200.0f);
                mc.player.rotationPitch = smoothRotation(mc.player.rotationPitch, targetRotations[1], pitchSpeedSetting.get() / 200.0f);
            } else {
                currentTarget = null;
            }
        } else {
            currentTarget = findClosestPlayer();
        }
    }

    private PlayerEntity findClosestPlayer() {
        PlayerEntity closestPlayer = null;
        double closestDistanceSq = Double.MAX_VALUE;
        for (PlayerEntity player : mc.world.getPlayers()) {
            if (player != mc.player && (!FriendStorage.isFriend(player.getName().getString()) || targetFriendsSetting.get()) && (!player.isInvisible() || targetInvisibleSetting.get())) {
                double distanceSq = mc.player.getDistanceSq(player);
                if (distanceSq < closestDistanceSq && distanceSq <= distanceSetting.get() * distanceSetting.get()) {
                    closestPlayer = player;
                    closestDistanceSq = distanceSq;
                }
            }
        }
        return closestPlayer;
    }

    private float[] calculateRotations(Entity entity) {
        double x = entity.getPosX() - mc.player.getPosX();
        double y = entity.getPosY() - mc.player.getPosY() + entity.getEyeHeight() - mc.player.getEyeHeight();
        double z = entity.getPosZ() - mc.player.getPosZ();
        double dist = Math.sqrt(x * x + z * z);
        float yaw = (float) ((Math.atan2(z, x) * 180 / Math.PI) - 90);
        float pitch = (float) (-(Math.atan2(y, dist) * 180 / Math.PI));
        return new float[]{yaw, pitch};
    }

    private float smoothRotation(float current, float target, float factor) {
        float delta = MathHelper.wrapDegrees(target - current);

        float minRotation = 0.01f;

        float rotation = delta * factor; // ну кароч полный кринж ,на фт кстати урон не урезает пользуйтесь

        if (Math.abs(rotation) < minRotation) {
            rotation = Math.copySign(minRotation, rotation);
        }

        return current + rotation;
    }
}
// ну вот и все
funtime ready selfcode solution?
 
Начинающий
Статус
Оффлайн
Регистрация
29 Апр 2023
Сообщения
741
Реакции[?]
4
Поинты[?]
5K
code :


AimAssist (LeyderClient):
// by layderdlc (супер кринж аим ассист)
package im.expensive.module.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.expensive.command.friends.FriendStorage;
import im.expensive.events.EventPacket;
import im.expensive.events.EventUpdate;
import im.expensive.module.api.Category;
import im.expensive.module.api.Function;
import im.expensive.module.api.FunctionRegister;
import im.expensive.module.settings.impl.BooleanSetting;
import im.expensive.module.settings.impl.SliderSetting;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.play.client.CUseEntityPacket;
import net.minecraft.util.math.MathHelper;

@FunctionRegister(name = "AimAssist", type = Category.Combat, description = "AimAssist , LeyderClient dev: slader", category = Category.Combat)
public class AimAssist extends Function {

    private final SliderSetting distanceSetting = new SliderSetting("Distance", 5.0f, 2.0f, 7.0f, 0.1f, 30);
    private final SliderSetting yawSpeedSetting = new SliderSetting("Yaw Speed", 30.0f, 0.0f, 100.0f, 1.0f, 30);
    private final SliderSetting pitchSpeedSetting = new SliderSetting("Pitch Speed", 15.0f, 0.0f, 100.0f, 1.0f, 30);
    private final BooleanSetting targetFriendsSetting = new BooleanSetting("Таргетить друзей", false);
    private final BooleanSetting targetInvisibleSetting = new BooleanSetting("Таргетить инвизок", false);

    private PlayerEntity currentTarget;
    private static final Minecraft mc = Minecraft.getInstance();

    public AimAssist() {
        addSettings(distanceSetting, yawSpeedSetting, pitchSpeedSetting, targetFriendsSetting, targetInvisibleSetting);
    }

    @Subscribe
    public void onPacket(EventPacket event) {
        if (event.getPacket() instanceof CUseEntityPacket) {
            CUseEntityPacket packet = (CUseEntityPacket) event.getPacket();
            Entity targetEntity = packet.getEntityFromWorld(mc.world);
            if (targetEntity instanceof PlayerEntity) {
                currentTarget = (PlayerEntity) targetEntity;
            }
        }
    }
// by slader
    @Subscribe
    public void onUpdate(EventUpdate event) {
        if (currentTarget != null) {
            if (mc.player.getDistance(currentTarget) <= distanceSetting.get()) {
                float[] targetRotations = calculateRotations(currentTarget);
                mc.player.rotationYaw = smoothRotation(mc.player.rotationYaw, targetRotations[0], yawSpeedSetting.get() / 200.0f);
                mc.player.rotationPitch = smoothRotation(mc.player.rotationPitch, targetRotations[1], pitchSpeedSetting.get() / 200.0f);
            } else {
                currentTarget = null;
            }
        } else {
            currentTarget = findClosestPlayer();
        }
    }

    private PlayerEntity findClosestPlayer() {
        PlayerEntity closestPlayer = null;
        double closestDistanceSq = Double.MAX_VALUE;
        for (PlayerEntity player : mc.world.getPlayers()) {
            if (player != mc.player && (!FriendStorage.isFriend(player.getName().getString()) || targetFriendsSetting.get()) && (!player.isInvisible() || targetInvisibleSetting.get())) {
                double distanceSq = mc.player.getDistanceSq(player);
                if (distanceSq < closestDistanceSq && distanceSq <= distanceSetting.get() * distanceSetting.get()) {
                    closestPlayer = player;
                    closestDistanceSq = distanceSq;
                }
            }
        }
        return closestPlayer;
    }

    private float[] calculateRotations(Entity entity) {
        double x = entity.getPosX() - mc.player.getPosX();
        double y = entity.getPosY() - mc.player.getPosY() + entity.getEyeHeight() - mc.player.getEyeHeight();
        double z = entity.getPosZ() - mc.player.getPosZ();
        double dist = Math.sqrt(x * x + z * z);
        float yaw = (float) ((Math.atan2(z, x) * 180 / Math.PI) - 90);
        float pitch = (float) (-(Math.atan2(y, dist) * 180 / Math.PI));
        return new float[]{yaw, pitch};
    }

    private float smoothRotation(float current, float target, float factor) {
        float delta = MathHelper.wrapDegrees(target - current);

        float minRotation = 0.01f;

        float rotation = delta * factor; // ну кароч полный кринж ,на фт кстати урон не урезает пользуйтесь

        if (Math.abs(rotation) < minRotation) {
            rotation = Math.copySign(minRotation, rotation);
        }

        return current + rotation;
    }
}
// ну вот и все
/del детекетится,ибо он нихуя не плавный
нормальный аим тебе никто не даст тут
 
Начинающий
Статус
Оффлайн
Регистрация
6 Дек 2023
Сообщения
169
Реакции[?]
2
Поинты[?]
0
code :


AimAssist (LeyderClient):
// by layderdlc (супер кринж аим ассист)
package im.expensive.module.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.expensive.command.friends.FriendStorage;
import im.expensive.events.EventPacket;
import im.expensive.events.EventUpdate;
import im.expensive.module.api.Category;
import im.expensive.module.api.Function;
import im.expensive.module.api.FunctionRegister;
import im.expensive.module.settings.impl.BooleanSetting;
import im.expensive.module.settings.impl.SliderSetting;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.play.client.CUseEntityPacket;
import net.minecraft.util.math.MathHelper;

@FunctionRegister(name = "AimAssist", type = Category.Combat, description = "AimAssist , LeyderClient dev: slader", category = Category.Combat)
public class AimAssist extends Function {

    private final SliderSetting distanceSetting = new SliderSetting("Distance", 5.0f, 2.0f, 7.0f, 0.1f, 30);
    private final SliderSetting yawSpeedSetting = new SliderSetting("Yaw Speed", 30.0f, 0.0f, 100.0f, 1.0f, 30);
    private final SliderSetting pitchSpeedSetting = new SliderSetting("Pitch Speed", 15.0f, 0.0f, 100.0f, 1.0f, 30);
    private final BooleanSetting targetFriendsSetting = new BooleanSetting("Таргетить друзей", false);
    private final BooleanSetting targetInvisibleSetting = new BooleanSetting("Таргетить инвизок", false);

    private PlayerEntity currentTarget;
    private static final Minecraft mc = Minecraft.getInstance();

    public AimAssist() {
        addSettings(distanceSetting, yawSpeedSetting, pitchSpeedSetting, targetFriendsSetting, targetInvisibleSetting);
    }

    @Subscribe
    public void onPacket(EventPacket event) {
        if (event.getPacket() instanceof CUseEntityPacket) {
            CUseEntityPacket packet = (CUseEntityPacket) event.getPacket();
            Entity targetEntity = packet.getEntityFromWorld(mc.world);
            if (targetEntity instanceof PlayerEntity) {
                currentTarget = (PlayerEntity) targetEntity;
            }
        }
    }
// by slader
    @Subscribe
    public void onUpdate(EventUpdate event) {
        if (currentTarget != null) {
            if (mc.player.getDistance(currentTarget) <= distanceSetting.get()) {
                float[] targetRotations = calculateRotations(currentTarget);
                mc.player.rotationYaw = smoothRotation(mc.player.rotationYaw, targetRotations[0], yawSpeedSetting.get() / 200.0f);
                mc.player.rotationPitch = smoothRotation(mc.player.rotationPitch, targetRotations[1], pitchSpeedSetting.get() / 200.0f);
            } else {
                currentTarget = null;
            }
        } else {
            currentTarget = findClosestPlayer();
        }
    }

    private PlayerEntity findClosestPlayer() {
        PlayerEntity closestPlayer = null;
        double closestDistanceSq = Double.MAX_VALUE;
        for (PlayerEntity player : mc.world.getPlayers()) {
            if (player != mc.player && (!FriendStorage.isFriend(player.getName().getString()) || targetFriendsSetting.get()) && (!player.isInvisible() || targetInvisibleSetting.get())) {
                double distanceSq = mc.player.getDistanceSq(player);
                if (distanceSq < closestDistanceSq && distanceSq <= distanceSetting.get() * distanceSetting.get()) {
                    closestPlayer = player;
                    closestDistanceSq = distanceSq;
                }
            }
        }
        return closestPlayer;
    }

    private float[] calculateRotations(Entity entity) {
        double x = entity.getPosX() - mc.player.getPosX();
        double y = entity.getPosY() - mc.player.getPosY() + entity.getEyeHeight() - mc.player.getEyeHeight();
        double z = entity.getPosZ() - mc.player.getPosZ();
        double dist = Math.sqrt(x * x + z * z);
        float yaw = (float) ((Math.atan2(z, x) * 180 / Math.PI) - 90);
        float pitch = (float) (-(Math.atan2(y, dist) * 180 / Math.PI));
        return new float[]{yaw, pitch};
    }

    private float smoothRotation(float current, float target, float factor) {
        float delta = MathHelper.wrapDegrees(target - current);

        float minRotation = 0.01f;

        float rotation = delta * factor; // ну кароч полный кринж ,на фт кстати урон не урезает пользуйтесь

        if (Math.abs(rotation) < minRotation) {
            rotation = Math.copySign(minRotation, rotation);
        }

        return current + rotation;
    }
}
// ну вот и все
//дел гпт
 
Сверху Снизу