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

Часть функционала DragonFly | Javelin / Mendix

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
1 Ноя 2025
Сообщения
15
Реакции
0
Выберите загрузчик игры
  1. Forge
  2. NeoForge
  3. ForgeOptiFine
ХЗ кому надо, но пусть будет
Пожалуйста, авторизуйтесь для просмотра ссылки.


DragonFly:
Expand Collapse Copy
package fun.mendix.client.modules.impl.movement;

import com.nrz.eventapi.EventTarget;
import net.minecraft.util.math.Vec3d;
import ru.nexusguard.protection.annotations.Native;
import fun.mendix.base.events.impl.player.EventMove;
import fun.mendix.base.events.impl.player.EventUpdate;
import fun.mendix.client.modules.api.Category;
import fun.mendix.client.modules.api.Module;
import fun.mendix.client.modules.api.ModuleAnnotation;
import fun.mendix.client.modules.api.setting.impl.BooleanSetting;
import fun.mendix.client.modules.api.setting.impl.NumberSetting;

@ModuleAnnotation(
        name = "DragonFly",
        category = Category.MOVEMENT,
        description = "Ускоряет полёт в креативе (/fly) + резкие движения"
)
public final class DragonFly extends Module {

    public static final DragonFly INSTANCE = new DragonFly();

    // ========== НАСТРОЙКИ ==========
    private final NumberSetting speed = new NumberSetting("Скорость", 2.0F, 0.5F, 5.0F, 0.1F);
    private final BooleanSetting instantMotion = new BooleanSetting("Резкие движения", true);

    private DragonFly() {}

    @Override
    public void onEnable() {
        super.onEnable();
    }

    @Override
    public void onDisable() {
        super.onDisable();
        if (mc.player != null) {
            // Возвращаем стандартную скорость полёта
            mc.player.getAbilities().setFlySpeed(0.05f);
            mc.player.sendAbilitiesUpdate();
        }
    }

    @EventTarget
    @Native
    private void onUpdate(EventUpdate e) {
        if (mc.player == null) return;

        // Работает только если игрок в режиме полёта (креатив / команда)
        if (mc.player.getAbilities().flying) {
            // Устанавливаем ускоренную скорость
            float flySpeed = speed.getCurrent() * 0.05f;
            mc.player.getAbilities().setFlySpeed(flySpeed);
            mc.player.sendAbilitiesUpdate();
        } else {
            // Если полёт выключен — сбрасываем на стандарт
            mc.player.getAbilities().setFlySpeed(0.05f);
            mc.player.sendAbilitiesUpdate();
        }
    }

    @EventTarget
    private void onMove(EventMove e) {
        if (mc.player == null) return;
        if (!mc.player.getAbilities().flying) return;
        if (!instantMotion.isEnabled()) return;

        Vec3d velocity = mc.player.getVelocity();

        float forward = mc.player.input.movementForward;
        float sideways = mc.player.input.movementSideways;

        if (forward == 0 && sideways == 0) {
            mc.player.setVelocity(0, velocity.y, 0);
        } else {
            // ГОРИЗОНТАЛЬ — ПОЛНАЯ СКОРОСТЬ
            double speedVal = speed.getCurrent(); // теперь 1:1

            Vec3d forwardVec = Vec3d.fromPolar(0, mc.player.getYaw()).normalize();
            Vec3d rightVec = Vec3d.fromPolar(0, mc.player.getYaw() - 90).normalize();

            double velX = forwardVec.x * forward * speedVal + rightVec.x * sideways * speedVal;
            double velZ = forwardVec.z * forward * speedVal + rightVec.z * sideways * speedVal;

            mc.player.setVelocity(velX, velocity.y, velZ);
        }

        // Вертикаль (оставляем как было — норм)
        if (mc.options.jumpKey.isPressed()) {
            mc.player.setVelocity(mc.player.getVelocity().x, speed.getCurrent() * 0.2, mc.player.getVelocity().z);
        } else if (mc.options.sneakKey.isPressed()) {
            mc.player.setVelocity(mc.player.getVelocity().x, -speed.getCurrent() * 0.2, mc.player.getVelocity().z);
        }
    }

    // ========== ГЕТТЕРЫ ==========
    public NumberSetting getSpeed() { return speed; }
    public BooleanSetting getInstantMotion() { return instantMotion; }
}
 
ХЗ кому надо, но пусть будет
Пожалуйста, авторизуйтесь для просмотра ссылки.


DragonFly:
Expand Collapse Copy
package fun.mendix.client.modules.impl.movement;

import com.nrz.eventapi.EventTarget;
import net.minecraft.util.math.Vec3d;
import ru.nexusguard.protection.annotations.Native;
import fun.mendix.base.events.impl.player.EventMove;
import fun.mendix.base.events.impl.player.EventUpdate;
import fun.mendix.client.modules.api.Category;
import fun.mendix.client.modules.api.Module;
import fun.mendix.client.modules.api.ModuleAnnotation;
import fun.mendix.client.modules.api.setting.impl.BooleanSetting;
import fun.mendix.client.modules.api.setting.impl.NumberSetting;

@ModuleAnnotation(
        name = "DragonFly",
        category = Category.MOVEMENT,
        description = "Ускоряет полёт в креативе (/fly) + резкие движения"
)
public final class DragonFly extends Module {

    public static final DragonFly INSTANCE = new DragonFly();

    // ========== НАСТРОЙКИ ==========
    private final NumberSetting speed = new NumberSetting("Скорость", 2.0F, 0.5F, 5.0F, 0.1F);
    private final BooleanSetting instantMotion = new BooleanSetting("Резкие движения", true);

    private DragonFly() {}

    @Override
    public void onEnable() {
        super.onEnable();
    }

    @Override
    public void onDisable() {
        super.onDisable();
        if (mc.player != null) {
            // Возвращаем стандартную скорость полёта
            mc.player.getAbilities().setFlySpeed(0.05f);
            mc.player.sendAbilitiesUpdate();
        }
    }

    @EventTarget
    @Native
    private void onUpdate(EventUpdate e) {
        if (mc.player == null) return;

        // Работает только если игрок в режиме полёта (креатив / команда)
        if (mc.player.getAbilities().flying) {
            // Устанавливаем ускоренную скорость
            float flySpeed = speed.getCurrent() * 0.05f;
            mc.player.getAbilities().setFlySpeed(flySpeed);
            mc.player.sendAbilitiesUpdate();
        } else {
            // Если полёт выключен — сбрасываем на стандарт
            mc.player.getAbilities().setFlySpeed(0.05f);
            mc.player.sendAbilitiesUpdate();
        }
    }

    @EventTarget
    private void onMove(EventMove e) {
        if (mc.player == null) return;
        if (!mc.player.getAbilities().flying) return;
        if (!instantMotion.isEnabled()) return;

        Vec3d velocity = mc.player.getVelocity();

        float forward = mc.player.input.movementForward;
        float sideways = mc.player.input.movementSideways;

        if (forward == 0 && sideways == 0) {
            mc.player.setVelocity(0, velocity.y, 0);
        } else {
            // ГОРИЗОНТАЛЬ — ПОЛНАЯ СКОРОСТЬ
            double speedVal = speed.getCurrent(); // теперь 1:1

            Vec3d forwardVec = Vec3d.fromPolar(0, mc.player.getYaw()).normalize();
            Vec3d rightVec = Vec3d.fromPolar(0, mc.player.getYaw() - 90).normalize();

            double velX = forwardVec.x * forward * speedVal + rightVec.x * sideways * speedVal;
            double velZ = forwardVec.z * forward * speedVal + rightVec.z * sideways * speedVal;

            mc.player.setVelocity(velX, velocity.y, velZ);
        }

        // Вертикаль (оставляем как было — норм)
        if (mc.options.jumpKey.isPressed()) {
            mc.player.setVelocity(mc.player.getVelocity().x, speed.getCurrent() * 0.2, mc.player.getVelocity().z);
        } else if (mc.options.sneakKey.isPressed()) {
            mc.player.setVelocity(mc.player.getVelocity().x, -speed.getCurrent() * 0.2, mc.player.getVelocity().z);
        }
    }

    // ========== ГЕТТЕРЫ ==========
    public NumberSetting getSpeed() { return speed; }
    public BooleanSetting getInstantMotion() { return instantMotion; }
}
normik
 
ХЗ кому надо, но пусть будет
Пожалуйста, авторизуйтесь для просмотра ссылки.


DragonFly:
Expand Collapse Copy
package fun.mendix.client.modules.impl.movement;

import com.nrz.eventapi.EventTarget;
import net.minecraft.util.math.Vec3d;
import ru.nexusguard.protection.annotations.Native;
import fun.mendix.base.events.impl.player.EventMove;
import fun.mendix.base.events.impl.player.EventUpdate;
import fun.mendix.client.modules.api.Category;
import fun.mendix.client.modules.api.Module;
import fun.mendix.client.modules.api.ModuleAnnotation;
import fun.mendix.client.modules.api.setting.impl.BooleanSetting;
import fun.mendix.client.modules.api.setting.impl.NumberSetting;

@ModuleAnnotation(
        name = "DragonFly",
        category = Category.MOVEMENT,
        description = "Ускоряет полёт в креативе (/fly) + резкие движения"
)
public final class DragonFly extends Module {

    public static final DragonFly INSTANCE = new DragonFly();

    // ========== НАСТРОЙКИ ==========
    private final NumberSetting speed = new NumberSetting("Скорость", 2.0F, 0.5F, 5.0F, 0.1F);
    private final BooleanSetting instantMotion = new BooleanSetting("Резкие движения", true);

    private DragonFly() {}

    @Override
    public void onEnable() {
        super.onEnable();
    }

    @Override
    public void onDisable() {
        super.onDisable();
        if (mc.player != null) {
            // Возвращаем стандартную скорость полёта
            mc.player.getAbilities().setFlySpeed(0.05f);
            mc.player.sendAbilitiesUpdate();
        }
    }

    @EventTarget
    @Native
    private void onUpdate(EventUpdate e) {
        if (mc.player == null) return;

        // Работает только если игрок в режиме полёта (креатив / команда)
        if (mc.player.getAbilities().flying) {
            // Устанавливаем ускоренную скорость
            float flySpeed = speed.getCurrent() * 0.05f;
            mc.player.getAbilities().setFlySpeed(flySpeed);
            mc.player.sendAbilitiesUpdate();
        } else {
            // Если полёт выключен — сбрасываем на стандарт
            mc.player.getAbilities().setFlySpeed(0.05f);
            mc.player.sendAbilitiesUpdate();
        }
    }

    @EventTarget
    private void onMove(EventMove e) {
        if (mc.player == null) return;
        if (!mc.player.getAbilities().flying) return;
        if (!instantMotion.isEnabled()) return;

        Vec3d velocity = mc.player.getVelocity();

        float forward = mc.player.input.movementForward;
        float sideways = mc.player.input.movementSideways;

        if (forward == 0 && sideways == 0) {
            mc.player.setVelocity(0, velocity.y, 0);
        } else {
            // ГОРИЗОНТАЛЬ — ПОЛНАЯ СКОРОСТЬ
            double speedVal = speed.getCurrent(); // теперь 1:1

            Vec3d forwardVec = Vec3d.fromPolar(0, mc.player.getYaw()).normalize();
            Vec3d rightVec = Vec3d.fromPolar(0, mc.player.getYaw() - 90).normalize();

            double velX = forwardVec.x * forward * speedVal + rightVec.x * sideways * speedVal;
            double velZ = forwardVec.z * forward * speedVal + rightVec.z * sideways * speedVal;

            mc.player.setVelocity(velX, velocity.y, velZ);
        }

        // Вертикаль (оставляем как было — норм)
        if (mc.options.jumpKey.isPressed()) {
            mc.player.setVelocity(mc.player.getVelocity().x, speed.getCurrent() * 0.2, mc.player.getVelocity().z);
        } else if (mc.options.sneakKey.isPressed()) {
            mc.player.setVelocity(mc.player.getVelocity().x, -speed.getCurrent() * 0.2, mc.player.getVelocity().z);
        }
    }

    // ========== ГЕТТЕРЫ ==========
    public NumberSetting getSpeed() { return speed; }
    public BooleanSetting getInstantMotion() { return instantMotion; }
}
о боже сука, удалите свои нейронки уже
1771068544157.png
 
Назад
Сверху Снизу