Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

Вопрос Не работают стрейфы

Забаненный
Забаненный
Статус
Оффлайн
Регистрация
2 Мар 2022
Сообщения
56
Реакции
1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
спастил стрейфы, просто не работает элитра буст и даже не стрейфятся
база экспенсив 3.4
Код:
Expand Collapse Copy
@ModuleAnnotation(name = "Strafe", desc = "Позволяет стрейфить", type = Type.Movement)
public class StrafeSunriseModule extends Module {

    TimerUtility elytraDelay = new TimerUtility();
    public static boolean needSprintState;
    public static int counter;
    public static BooleanSetting elytra = new BooleanSetting("Elytra-Boost", true);
    public static SliderSetting speed = new SliderSetting("Speed", 1, 0, 2, 0.01f);
        private int waterTicks;
        @EventTarget
        public void onUpdate (EventUpdate event) {
            if (elytra.get()) {
                if (mc.player.fallDistance != 0.0F) {
                    if ((double) mc.player.fallDistance < 0.1)
                        if (mc.player.motionY < -0.1 && this.elytraDelay.hasTimeElapsed(190L)) {
                            this.disabler();
                            this.elytraDelay.reset();
                        }
                }
            }
        }
    @EventTarget
        public void onMOVE(EventMove move) {
        boolean toGround = move.toGround();
        if (mc.player.fallDistance >= 3.0F && toGround) {
            Vec3d var3 = move.to();
        }
        if (MoveUtility.isInLiquid()) {
            this.waterTicks = 10;
        } else {
            --this.waterTicks;
        }
        if (this.strafes()) {
            double forward = mc.player.movementInput.moveForward;
            double strafe = mc.player.movementInput.moveStrafe;
            float yaw = mc.player.rotationYaw;
            if (forward == 0.0 && strafe == 0.0) {
                MatrixStrafeMovement.oldSpeed = 0.0;
                move.motion().x = 0.0;
                move.motion().z = 0.0;
            } else {
                if (elytra.get()) {
                    int elytraSlot = getHotbarSlotOfItem();
                    if (elytra.get() && elytraSlot != -1 && MoveUtility.isMoving()) {
                        if (!mc.player.onGround) {
                            if ((double)mc.player.fallDistance >= 0.15 && move.toGround()) {
                                setMotion((double) StrafeSunriseModule.speed.getFloatValue());
                                MatrixStrafeMovement.oldSpeed = (double) StrafeSunriseModule.speed.getFloatValue() / 1.06;
                            }
                        }
                    }
                }
                if (forward != 0.0) {
                    if (strafe > 0.0) {
                        yaw += (float)(forward > 0.0 ? -45 : 45);
                    } else if (strafe < 0.0) {
                        yaw += (float)(forward > 0.0 ? 45 : -45);
                    }
                    strafe = 0.0;
                    if (forward > 0.0) {
                        forward = 1.0;
                    } else if (forward < 0.0) {
                        forward = -1.0;
                    }
                }
                double speed = MatrixStrafeMovement.calculateSpeed(move);
                move.motion().x = forward * speed * Math.cos(Math.toRadians((double)(yaw + 90.0F))) + strafe * speed * Math.sin(Math.toRadians((double)(yaw + 90.0F)));
                move.motion().z = forward * speed * Math.sin(Math.toRadians((double)(yaw + 90.0F))) - strafe * speed * Math.cos(Math.toRadians((double)(yaw + 90.0F)));
            }
        } else {
            MatrixStrafeMovement.oldSpeed = 0.0;
        }
    }
    @EventTarget
    public void onPostMove(EventPostMove event) {
        MatrixStrafeMovement.postMove(event.getHorizontalMove());
    }
    @EventTarget
    public void onActionEvent(EventAction event) {
        MatrixStrafeMovement.actionEvent(event);
        if (CPacketEntityAction.lastUpdatedSprint != needSprintState) {
            event.sprintState = !CPacketEntityAction.lastUpdatedSprint;
        }
    }
    public void onEnable() {
        super.onEnable();
    }

    public void onDisable() {
        this.elytraDelay.reset();
        this.waterTicks = 0;
        super.onDisable();
    }
    public static void setMotion(double motion) {
        double forward = mc.player.movementInput.moveForward;
        double strafe = mc.player.movementInput.moveStrafe;
        float yaw = mc.player.rotationYaw;
        if (forward == 0.0 && strafe == 0.0) {
            mc.player.motionX = 0.0;
            mc.player.motionZ = 0.0;
            MatrixStrafeMovement.oldSpeed = 0.0;
        } else {
            if (forward != 0.0) {
                if (strafe > 0.0) {
                    yaw += (float)(forward > 0.0 ? -45 : 45);
                } else if (strafe < 0.0) {
                    yaw += (float)(forward > 0.0 ? 45 : -45);
                }
                strafe = 0.0;
                if (forward > 0.0) {
                    forward = 1.0;
                } else if (forward < 0.0) {
                    forward = -1.0;
                }
            }
            double cosinus = Math.cos(Math.toRadians((double)(yaw + 90.0F)));
            double sinus = Math.sin(Math.toRadians((double)(yaw + 90.0F)));
            mc.player.motionX = forward * motion * cosinus + strafe * motion * sinus;
            mc.player.motionZ = forward * motion * sinus - strafe * motion * cosinus;
        }

    }
    private void disabler() {
        if (StrafeSunriseModule.elytra.get()) {
            int elytra = getHotbarSlotOfItem();
            if (!mc.player.isInWater()) {
                if (!mc.player.isInLava() && this.waterTicks <= 0 && elytra != -1) {
                    if (!mc.player.isInWeb) {
                        if (elytra != -2) {
                            mc.playerController.windowClick(0, elytra, 1, ClickType.PICKUP, mc.player);
                            mc.playerController.windowClick(0, 6, 1, ClickType.PICKUP, mc.player);
                        }

                        NetHandlerPlayClient var2 = mc.getConnection();
                        var2.sendPacket(new CPacketEntityAction(mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
                        var2 = mc.getConnection();
                        var2.sendPacket(new CPacketEntityAction(mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
                        if (elytra != -2) {
                            mc.playerController.windowClick(0, 6, 1, ClickType.PICKUP, mc.player);
                            mc.playerController.windowClick(0, elytra, 1, ClickType.PICKUP, mc.player);
                        }
                    }
                }
            }
        }
    }
    public static int getHotbarSlotOfItem() {
        Iterator var0 = mc.player.getArmorInventoryList().iterator();

        while (var0.hasNext()) {
            ItemStack stack = (ItemStack) var0.next();
            if (stack.getItem() == Items.ELYTRA) {
                return -2;
            }
        }
        int slot = -1;

        for (int i = 0; i < 36; ++i) {
            ItemStack s = mc.player.inventory.getStackInSlot(i);
            if (s.getItem() == Items.ELYTRA) {
                slot = i;
                break;
            }
        }
        if (slot < 9 && slot != -1) {
            slot += 36;
        }
        return slot;
    }
    public boolean strafes() {
        if (mc.player == null) {
            return false;
        } else if (Vishka.getInstance().manager.getModule(ElytraSunrise.class).state) {
            return false;
        } else if (Vishka.getInstance().manager.getModule(FlightModule.class).state) {
            return false;
        } else if (Vishka.getInstance().manager.getModule(TargetStrafeModule.class).state) {
            return false;
        } else {
            if (mc.player.isSneaking()) {
                return false;
            } else {
                if (mc.player.isInLava()) {
                    return false;
                } else {
                    if (mc.player.isInWater()) {
                        return false;
                    } else {
                        return !mc.player.capabilities.isFlying;
                    }
                }
            }
        }
    }
}
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Зафотошопь стрейфы, мб поможет
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
1699522320523.png
 
спастил стрейфы, просто не работает элитра буст и даже не стрейфятся
база экспенсив 3.4
Код:
Expand Collapse Copy
@ModuleAnnotation(name = "Strafe", desc = "Позволяет стрейфить", type = Type.Movement)
public class StrafeSunriseModule extends Module {

    TimerUtility elytraDelay = new TimerUtility();
    public static boolean needSprintState;
    public static int counter;
    public static BooleanSetting elytra = new BooleanSetting("Elytra-Boost", true);
    public static SliderSetting speed = new SliderSetting("Speed", 1, 0, 2, 0.01f);
        private int waterTicks;
        @EventTarget
        public void onUpdate (EventUpdate event) {
            if (elytra.get()) {
                if (mc.player.fallDistance != 0.0F) {
                    if ((double) mc.player.fallDistance < 0.1)
                        if (mc.player.motionY < -0.1 && this.elytraDelay.hasTimeElapsed(190L)) {
                            this.disabler();
                            this.elytraDelay.reset();
                        }
                }
            }
        }
    @EventTarget
        public void onMOVE(EventMove move) {
        boolean toGround = move.toGround();
        if (mc.player.fallDistance >= 3.0F && toGround) {
            Vec3d var3 = move.to();
        }
        if (MoveUtility.isInLiquid()) {
            this.waterTicks = 10;
        } else {
            --this.waterTicks;
        }
        if (this.strafes()) {
            double forward = mc.player.movementInput.moveForward;
            double strafe = mc.player.movementInput.moveStrafe;
            float yaw = mc.player.rotationYaw;
            if (forward == 0.0 && strafe == 0.0) {
                MatrixStrafeMovement.oldSpeed = 0.0;
                move.motion().x = 0.0;
                move.motion().z = 0.0;
            } else {
                if (elytra.get()) {
                    int elytraSlot = getHotbarSlotOfItem();
                    if (elytra.get() && elytraSlot != -1 && MoveUtility.isMoving()) {
                        if (!mc.player.onGround) {
                            if ((double)mc.player.fallDistance >= 0.15 && move.toGround()) {
                                setMotion((double) StrafeSunriseModule.speed.getFloatValue());
                                MatrixStrafeMovement.oldSpeed = (double) StrafeSunriseModule.speed.getFloatValue() / 1.06;
                            }
                        }
                    }
                }
                if (forward != 0.0) {
                    if (strafe > 0.0) {
                        yaw += (float)(forward > 0.0 ? -45 : 45);
                    } else if (strafe < 0.0) {
                        yaw += (float)(forward > 0.0 ? 45 : -45);
                    }
                    strafe = 0.0;
                    if (forward > 0.0) {
                        forward = 1.0;
                    } else if (forward < 0.0) {
                        forward = -1.0;
                    }
                }
                double speed = MatrixStrafeMovement.calculateSpeed(move);
                move.motion().x = forward * speed * Math.cos(Math.toRadians((double)(yaw + 90.0F))) + strafe * speed * Math.sin(Math.toRadians((double)(yaw + 90.0F)));
                move.motion().z = forward * speed * Math.sin(Math.toRadians((double)(yaw + 90.0F))) - strafe * speed * Math.cos(Math.toRadians((double)(yaw + 90.0F)));
            }
        } else {
            MatrixStrafeMovement.oldSpeed = 0.0;
        }
    }
    @EventTarget
    public void onPostMove(EventPostMove event) {
        MatrixStrafeMovement.postMove(event.getHorizontalMove());
    }
    @EventTarget
    public void onActionEvent(EventAction event) {
        MatrixStrafeMovement.actionEvent(event);
        if (CPacketEntityAction.lastUpdatedSprint != needSprintState) {
            event.sprintState = !CPacketEntityAction.lastUpdatedSprint;
        }
    }
    public void onEnable() {
        super.onEnable();
    }

    public void onDisable() {
        this.elytraDelay.reset();
        this.waterTicks = 0;
        super.onDisable();
    }
    public static void setMotion(double motion) {
        double forward = mc.player.movementInput.moveForward;
        double strafe = mc.player.movementInput.moveStrafe;
        float yaw = mc.player.rotationYaw;
        if (forward == 0.0 && strafe == 0.0) {
            mc.player.motionX = 0.0;
            mc.player.motionZ = 0.0;
            MatrixStrafeMovement.oldSpeed = 0.0;
        } else {
            if (forward != 0.0) {
                if (strafe > 0.0) {
                    yaw += (float)(forward > 0.0 ? -45 : 45);
                } else if (strafe < 0.0) {
                    yaw += (float)(forward > 0.0 ? 45 : -9);
                }
                strafe = 0.0;
                if (forward > 0.0) {
                    forward = 1.0;
                } else if (forward < 0.0) {
                    forward = -1.0;
                }
            }
            double cosinus = Math.cos(Math.toRadians((double)(yaw * 0.1F)));
            double sinus = Math.sin(Math.toRadians((double)(yaw - 90.0F)));
            mc.player.motionX = forward * motion * cosinus + strafe * motion * sinus;
            mc.player.motionZ = forward * motion * sinus - strafe * motion * cosinus;
        }

    }
    private void disabler() {
        if (StrafeSunriseModule.elytra.get()) {
            int elytra = getHotbarSlotOfItem();
            if (!mc.player.isInWater()) {
                if (!mc.player.isInLava() && this.waterTicks <= 0 && elytra != -1) {
                    if (!mc.player.isInWeb) {
                        if (elytra != -2) {
                            mc.playerController.windowClick(0, elytra, 1, ClickType.PICKUP, mc.player);
                            mc.playerController.windowClick(0, 6, 1, ClickType.PICKUP, mc.player);
                        }

                        NetHandlerPlayClient var2 = mc.getConnection();
                        var2.sendPacket(new CPacketEntityAction(mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
                        var2 = mc.getConnection();
                        var2.sendPacket(new CPacketEntityAction(mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
                        if (elytra != -2) {
                            mc.playerController.windowClick(0, 19, 1, ClickType.PICKUP, mc.player);
                            mc.playerController.windowClick(0, elytra, 2, ClickType.PICKUP, mc.player);
                        }
                    }
                }
            }
        }
    }
    public static int getHotbarSlotOfItem() {
        Iterator var0 = mc.player.getArmorInventoryList().iterator();

        while (var0.hasNext()) {
            ItemStack stack = (ItemStack) var0.next();
            if (stack.getItem() == Items.ELYTRA) {
                return -2;
            }
        }
        int slot = -1;

        for (int i = 0; i < 42; ++i) {
            ItemStack s = mc.player.inventory.getStackInSlot(i);
            if (s.getItem() == Items.ELYTRA) {
                slot = i;
                break;
            }
        }
        if (slot < 9 && slot != -1) {
            slot += 36;
        }
        return slot;
    }
    public boolean strafes() {
        if (mc.player == null) {
            return false;
        } else if (Блядишка.getInstance().manager.getModule(ElytraSunrise.class).state) {
            return false;
        } else if (Бляди сынишка.getInstance().manager.getModule(FlightModule.class).state) {
            return false;
        } else if (Блядишка.getInstance().manager.getModule(TargetStrafeModule.class).state) {
            return false;
        } else {
            if (!mc.player.isSneaking()) {
                return false;
            } else {
                if (!mc.player.isInLava()) {
                    return false;
                } else {
                    if (!mc.player.isInWater()) {
                        return false;
                    } else {
                        return !mc.player.capabilities.isFlying;
                    }
                }
            }
        }
    }
}
у тебя формула уебанская, вот так вставь, я отредачил тебе код
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
значит ты не вставил мой код, вставь его и покажи ВСЕ ошибки и как ты их исправлял ://
только эти ошибки были сменил на Vishka и все, больше не было ошибок только варнинги
1699523375432.png
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
только эти ошибки были сменил на Vishka и все, больше не было ошибок только варнинги Посмотреть вложение 263470
окей ну я гляну еще ЧЕСТНО ХЗ мне вот помогало я там тебе еще восклицательные знаки в конце подобавлял и кароче чуть чуть градусов прибавил где то убивал ну у меня прокатывало
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Назад
Сверху Снизу