Исходник Legit aura 3.1

Начинающий
Статус
Оффлайн
Регистрация
22 Май 2023
Сообщения
97
Реакции[?]
0
Поинты[?]
0

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

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

Спасибо!

ну типо вот код надеюсь не засрёте. кому надо тот улучшит
сс -
LegitAura.java:
package im.expensive.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.expensive.command.friends.FriendStorage;
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.SliderSetting;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.player.AttackUtil;
import im.expensive.utils.player.InventoryUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.network.play.client.CEntityActionPacket;
import net.minecraft.network.play.client.CHeldItemChangePacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.EntityRayTraceResult;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult;

import java.util.ArrayList;
import java.util.List;

@FunctionRegister(name = "LegitAura", type = Category.Combat)
public class LegitAura extends Function {

    private final SliderSetting distanceSetting = new SliderSetting("Дистанция", 3.0f, 2.0f, 3.5f, 0.1f);
    private final SliderSetting yawSpeedSetting = new SliderSetting("Yaw Скорость", 30.0f, 0.0f, 200.0f, 1.0f);
    private final SliderSetting pitchSpeedSetting = new SliderSetting("Pitch Скорость", 50.0f, 0.0f, 100.0f, 1.0f);
    private final BooleanSetting targetFriendsSetting = new BooleanSetting("Таргетить друзей", false);
    private final BooleanSetting targetInvisibleSetting = new BooleanSetting("Таргетить инвизок", false);
    private final BooleanSetting players = new BooleanSetting("Игроки", true);
    private final BooleanSetting mobs = new BooleanSetting("Мобы", true);
    private final BooleanSetting animals = new BooleanSetting("Животные", true);
    private final BooleanSetting onlyCrit = new BooleanSetting("Только криты", true);
    private final BooleanSetting shieldBreak = new BooleanSetting("Ломать щит", false);

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

    public LegitAura() {
        addSettings(distanceSetting, yawSpeedSetting, pitchSpeedSetting, targetFriendsSetting, targetInvisibleSetting,
                players, mobs, animals, onlyCrit, shieldBreak);
    }

    @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);

                if (isAimedAtEntity(currentTarget) && shouldAttack()) {
                    stopWatch.setLastMS(500);
                    attackEntity(currentTarget);
                }
            } else {
                currentTarget = null;
            }
        } else {
            currentTarget = findClosestPlayer();
        }
    }

    private PlayerEntity findClosestPlayer() {
        List<LivingEntity> targets = new ArrayList<>();
        for (Entity entity : mc.world.getAllEntities()) {
            if (!(entity instanceof LivingEntity living)) continue;
            targets.add(living);
        }
        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 boolean isAimedAtEntity(Entity entity) {
        if (mc.objectMouseOver != null && mc.objectMouseOver.getType() == RayTraceResult.Type.ENTITY) {
            EntityRayTraceResult entityRayTraceResult = (EntityRayTraceResult) mc.objectMouseOver;
            return entityRayTraceResult.getEntity() == entity;
        }
        return false;
    }

    private boolean shouldAttack() {
        return AttackUtil.isPlayerFalling(onlyCrit.get(), true, false) && (stopWatch.hasTimeElapsed());
    }

    private void attackEntity(Entity entity) {
        boolean shouldStopSprinting = false;
        if (onlyCrit.get() && CEntityActionPacket.lastUpdatedSprint) {
            mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.STOP_SPRINTING));
            shouldStopSprinting = true;
        }

        mc.playerController.attackEntity(mc.player, entity);
        mc.player.swingArm(Hand.MAIN_HAND);
        if (shieldBreak.get() && entity instanceof PlayerEntity) {
            breakShieldPlayer(entity);
        }

        if (shouldStopSprinting) {
            mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.START_SPRINTING));
        }
    }

    private void breakShieldPlayer(Entity entity) {
        if (((LivingEntity) entity).isBlocking()) {
            int invSlot = InventoryUtil.getInstance().getAxeInInventory(false);
            int hotBarSlot = InventoryUtil.getInstance().getAxeInInventory(true);
            if (hotBarSlot == -1 && invSlot != -1) {
                int bestSlot = InventoryUtil.getInstance().findBestSlotInHotBar();
                mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, mc.player);
                mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, mc.player);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(bestSlot));
                mc.playerController.attackEntity(mc.player, entity);
                mc.player.swingArm(Hand.MAIN_HAND);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem));
                mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, mc.player);
                mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, mc.player);
            }

            if (hotBarSlot != -1) {
                mc.player.connection.sendPacket(new CHeldItemChangePacket(hotBarSlot));
                mc.playerController.attackEntity(mc.player, entity);
                mc.player.swingArm(Hand.MAIN_HAND);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem));
            }
        }
    }

    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);
        return current + delta * factor;
    }

    @Override
    public void onDisable() {
        stopWatch.reset();
        super.onDisable();
    }
}
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
18 Авг 2023
Сообщения
360
Реакции[?]
2
Поинты[?]
1K
бляяя как же я люблю обмазываться говнокодом и жрать писюн целестиала даааа
 
Начинающий
Статус
Оффлайн
Регистрация
25 Фев 2024
Сообщения
503
Реакции[?]
0
Поинты[?]
0
ну типо вот код надеюсь не засрёте. кому надо тот улучшит
сс -
Скрытое содержимое
/del your client - reneim desteny.cc
ну типо вот код надеюсь не засрёте. кому надо тот улучшит
сс -
Скрытое содержимое
извиняйся за то что просил помочь в твой чит стиллак засунуть
 
Начинающий
Статус
Оффлайн
Регистрация
23 Апр 2024
Сообщения
51
Реакции[?]
0
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
12 Июн 2024
Сообщения
486
Реакции[?]
1
Поинты[?]
1K
Начинающий
Статус
Оффлайн
Регистрация
1 Авг 2024
Сообщения
30
Реакции[?]
0
Поинты[?]
0
ну типо вот код надеюсь не засрёте. кому надо тот улучшит
сс -
Скрытое содержимое
/del
Во первых смысл сливать для одного типа
Во вторых смысл от неё если на видео видно какая она дёрганая
 
expenis 3.1 paster
Пользователь
Статус
Оффлайн
Регистрация
20 Апр 2021
Сообщения
1,468
Реакции[?]
34
Поинты[?]
46K
ну типо вот код надеюсь не засрёте. кому надо тот улучшит
сс -
Скрытое содержимое
я обосрался звука включения модуля, что за пиздец такой? + легитаура хуета
 
Начинающий
Статус
Оффлайн
Регистрация
11 Апр 2024
Сообщения
57
Реакции[?]
0
Поинты[?]
0
ну типо вот код надеюсь не засрёте. кому надо тот улучшит
сс -
LegitAura.java:
package im.expensive.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.expensive.command.friends.FriendStorage;
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.SliderSetting;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.player.AttackUtil;
import im.expensive.utils.player.InventoryUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.network.play.client.CEntityActionPacket;
import net.minecraft.network.play.client.CHeldItemChangePacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.EntityRayTraceResult;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult;

import java.util.ArrayList;
import java.util.List;

@FunctionRegister(name = "LegitAura", type = Category.Combat)
public class LegitAura extends Function {

    private final SliderSetting distanceSetting = new SliderSetting("Дистанция", 3.0f, 2.0f, 3.5f, 0.1f);
    private final SliderSetting yawSpeedSetting = new SliderSetting("Yaw Скорость", 30.0f, 0.0f, 200.0f, 1.0f);
    private final SliderSetting pitchSpeedSetting = new SliderSetting("Pitch Скорость", 50.0f, 0.0f, 100.0f, 1.0f);
    private final BooleanSetting targetFriendsSetting = new BooleanSetting("Таргетить друзей", false);
    private final BooleanSetting targetInvisibleSetting = new BooleanSetting("Таргетить инвизок", false);
    private final BooleanSetting players = new BooleanSetting("Игроки", true);
    private final BooleanSetting mobs = new BooleanSetting("Мобы", true);
    private final BooleanSetting animals = new BooleanSetting("Животные", true);
    private final BooleanSetting onlyCrit = new BooleanSetting("Только криты", true);
    private final BooleanSetting shieldBreak = new BooleanSetting("Ломать щит", false);

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

    public LegitAura() {
        addSettings(distanceSetting, yawSpeedSetting, pitchSpeedSetting, targetFriendsSetting, targetInvisibleSetting,
                players, mobs, animals, onlyCrit, shieldBreak);
    }

    @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);

                if (isAimedAtEntity(currentTarget) && shouldAttack()) {
                    stopWatch.setLastMS(500);
                    attackEntity(currentTarget);
                }
            } else {
                currentTarget = null;
            }
        } else {
            currentTarget = findClosestPlayer();
        }
    }

    private PlayerEntity findClosestPlayer() {
        List<LivingEntity> targets = new ArrayList<>();
        for (Entity entity : mc.world.getAllEntities()) {
            if (!(entity instanceof LivingEntity living)) continue;
            targets.add(living);
        }
        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 boolean isAimedAtEntity(Entity entity) {
        if (mc.objectMouseOver != null && mc.objectMouseOver.getType() == RayTraceResult.Type.ENTITY) {
            EntityRayTraceResult entityRayTraceResult = (EntityRayTraceResult) mc.objectMouseOver;
            return entityRayTraceResult.getEntity() == entity;
        }
        return false;
    }

    private boolean shouldAttack() {
        return AttackUtil.isPlayerFalling(onlyCrit.get(), true, false) && (stopWatch.hasTimeElapsed());
    }

    private void attackEntity(Entity entity) {
        boolean shouldStopSprinting = false;
        if (onlyCrit.get() && CEntityActionPacket.lastUpdatedSprint) {
            mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.STOP_SPRINTING));
            shouldStopSprinting = true;
        }

        mc.playerController.attackEntity(mc.player, entity);
        mc.player.swingArm(Hand.MAIN_HAND);
        if (shieldBreak.get() && entity instanceof PlayerEntity) {
            breakShieldPlayer(entity);
        }

        if (shouldStopSprinting) {
            mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.START_SPRINTING));
        }
    }

    private void breakShieldPlayer(Entity entity) {
        if (((LivingEntity) entity).isBlocking()) {
            int invSlot = InventoryUtil.getInstance().getAxeInInventory(false);
            int hotBarSlot = InventoryUtil.getInstance().getAxeInInventory(true);
            if (hotBarSlot == -1 && invSlot != -1) {
                int bestSlot = InventoryUtil.getInstance().findBestSlotInHotBar();
                mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, mc.player);
                mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, mc.player);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(bestSlot));
                mc.playerController.attackEntity(mc.player, entity);
                mc.player.swingArm(Hand.MAIN_HAND);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem));
                mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, mc.player);
                mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, mc.player);
            }

            if (hotBarSlot != -1) {
                mc.player.connection.sendPacket(new CHeldItemChangePacket(hotBarSlot));
                mc.playerController.attackEntity(mc.player, entity);
                mc.player.swingArm(Hand.MAIN_HAND);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem));
            }
        }
    }

    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);
        return current + delta * factor;
    }

    @Override
    public void onDisable() {
        stopWatch.reset();
        super.onDisable();
    }
}
/del сливали
 
Начинающий
Статус
Оффлайн
Регистрация
18 Май 2023
Сообщения
51
Реакции[?]
0
Поинты[?]
0
ну типо вот код надеюсь не засрёте. кому надо тот улучшит
сс -
LegitAura.java:
package im.expensive.functions.impl.combat;

import com.google.common.eventbus.Subscribe;
import im.expensive.command.friends.FriendStorage;
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.SliderSetting;
import im.expensive.utils.math.StopWatch;
import im.expensive.utils.player.AttackUtil;
import im.expensive.utils.player.InventoryUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.network.play.client.CEntityActionPacket;
import net.minecraft.network.play.client.CHeldItemChangePacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.EntityRayTraceResult;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult;

import java.util.ArrayList;
import java.util.List;

@FunctionRegister(name = "LegitAura", type = Category.Combat)
public class LegitAura extends Function {

    private final SliderSetting distanceSetting = new SliderSetting("Дистанция", 3.0f, 2.0f, 3.5f, 0.1f);
    private final SliderSetting yawSpeedSetting = new SliderSetting("Yaw Скорость", 30.0f, 0.0f, 200.0f, 1.0f);
    private final SliderSetting pitchSpeedSetting = new SliderSetting("Pitch Скорость", 50.0f, 0.0f, 100.0f, 1.0f);
    private final BooleanSetting targetFriendsSetting = new BooleanSetting("Таргетить друзей", false);
    private final BooleanSetting targetInvisibleSetting = new BooleanSetting("Таргетить инвизок", false);
    private final BooleanSetting players = new BooleanSetting("Игроки", true);
    private final BooleanSetting mobs = new BooleanSetting("Мобы", true);
    private final BooleanSetting animals = new BooleanSetting("Животные", true);
    private final BooleanSetting onlyCrit = new BooleanSetting("Только криты", true);
    private final BooleanSetting shieldBreak = new BooleanSetting("Ломать щит", false);

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

    public LegitAura() {
        addSettings(distanceSetting, yawSpeedSetting, pitchSpeedSetting, targetFriendsSetting, targetInvisibleSetting,
                players, mobs, animals, onlyCrit, shieldBreak);
    }

    @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);

                if (isAimedAtEntity(currentTarget) && shouldAttack()) {
                    stopWatch.setLastMS(500);
                    attackEntity(currentTarget);
                }
            } else {
                currentTarget = null;
            }
        } else {
            currentTarget = findClosestPlayer();
        }
    }

    private PlayerEntity findClosestPlayer() {
        List<LivingEntity> targets = new ArrayList<>();
        for (Entity entity : mc.world.getAllEntities()) {
            if (!(entity instanceof LivingEntity living)) continue;
            targets.add(living);
        }
        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 boolean isAimedAtEntity(Entity entity) {
        if (mc.objectMouseOver != null && mc.objectMouseOver.getType() == RayTraceResult.Type.ENTITY) {
            EntityRayTraceResult entityRayTraceResult = (EntityRayTraceResult) mc.objectMouseOver;
            return entityRayTraceResult.getEntity() == entity;
        }
        return false;
    }

    private boolean shouldAttack() {
        return AttackUtil.isPlayerFalling(onlyCrit.get(), true, false) && (stopWatch.hasTimeElapsed());
    }

    private void attackEntity(Entity entity) {
        boolean shouldStopSprinting = false;
        if (onlyCrit.get() && CEntityActionPacket.lastUpdatedSprint) {
            mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.STOP_SPRINTING));
            shouldStopSprinting = true;
        }

        mc.playerController.attackEntity(mc.player, entity);
        mc.player.swingArm(Hand.MAIN_HAND);
        if (shieldBreak.get() && entity instanceof PlayerEntity) {
            breakShieldPlayer(entity);
        }

        if (shouldStopSprinting) {
            mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.START_SPRINTING));
        }
    }

    private void breakShieldPlayer(Entity entity) {
        if (((LivingEntity) entity).isBlocking()) {
            int invSlot = InventoryUtil.getInstance().getAxeInInventory(false);
            int hotBarSlot = InventoryUtil.getInstance().getAxeInInventory(true);
            if (hotBarSlot == -1 && invSlot != -1) {
                int bestSlot = InventoryUtil.getInstance().findBestSlotInHotBar();
                mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, mc.player);
                mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, mc.player);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(bestSlot));
                mc.playerController.attackEntity(mc.player, entity);
                mc.player.swingArm(Hand.MAIN_HAND);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem));
                mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, mc.player);
                mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, mc.player);
            }

            if (hotBarSlot != -1) {
                mc.player.connection.sendPacket(new CHeldItemChangePacket(hotBarSlot));
                mc.playerController.attackEntity(mc.player, entity);
                mc.player.swingArm(Hand.MAIN_HAND);
                mc.player.connection.sendPacket(new CHeldItemChangePacket(mc.player.inventory.currentItem));
            }
        }
    }

    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);
        return current + delta * factor;
    }

    @Override
    public void onDisable() {
        stopWatch.reset();
        super.onDisable();
    }
}
ну по факту у нас кроме yougame есть анонимный чат срипиди
 
Сверху Снизу