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

Часть функционала Bind clear | MENDIX

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
25 Сен 2024
Сообщения
30
Реакции
0
Выберите загрузчик игры
  1. Forge
  2. Fabric
знаю легко написать но сливаю для чайников
BindCommponent:
Expand Collapse Copy
package fun.mendix.base.comand.impl;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import fun.mendix.Mendix;
import fun.mendix.base.comand.api.CommandAbstract;
import fun.mendix.client.modules.api.Module;
import fun.mendix.utility.game.other.MessageUtil;
import net.minecraft.command.CommandSource;
import net.minecraft.util.Formatting;
import ru.nexusguard.protection.annotations.Native;

public class BindCommand extends CommandAbstract {
    public BindCommand() {
        super("bind");
    }

    @Native
    public void execute(LiteralArgumentBuilder<CommandSource> builder) {
        builder.then(literal("clear").executes((context) -> {
            int clearedCount = 0;
            for (Module module : Mendix.getInstance().getModuleManager().getModules()) {
                if (module.getKeyCode() != -1) {
                    module.setKeyCode(-1);
                    clearedCount++;
                }
            }
            String var10000 = String.valueOf(Formatting.GRAY);
            MessageUtil.displayInfo(var10000 + "Очистил бинды: " + String.valueOf(Formatting.WHITE) + clearedCount);
            return 1;
        }));
    }
}
 
знаю легко написать но сливаю для чайников
BindCommponent:
Expand Collapse Copy
package fun.mendix.base.comand.impl;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import fun.mendix.Mendix;
import fun.mendix.base.comand.api.CommandAbstract;
import fun.mendix.client.modules.api.Module;
import fun.mendix.utility.game.other.MessageUtil;
import net.minecraft.command.CommandSource;
import net.minecraft.util.Formatting;
import ru.nexusguard.protection.annotations.Native;

public class BindCommand extends CommandAbstract {
    public BindCommand() {
        super("bind");
    }

    @Native
    public void execute(LiteralArgumentBuilder<CommandSource> builder) {
        builder.then(literal("clear").executes((context) -> {
            int clearedCount = 0;
            for (Module module : Mendix.getInstance().getModuleManager().getModules()) {
                if (module.getKeyCode() != -1) {
                    module.setKeyCode(-1);
                    clearedCount++;
                }
            }
            String var10000 = String.valueOf(Formatting.GRAY);
            MessageUtil.displayInfo(var10000 + "Очистил бинды: " + String.valueOf(Formatting.WHITE) + clearedCount);
            return 1;
        }));
    }
}
нормально
 
знаю легко написать но сливаю для чайников
BindCommponent:
Expand Collapse Copy
package fun.mendix.base.comand.impl;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import fun.mendix.Mendix;
import fun.mendix.base.comand.api.CommandAbstract;
import fun.mendix.client.modules.api.Module;
import fun.mendix.utility.game.other.MessageUtil;
import net.minecraft.command.CommandSource;
import net.minecraft.util.Formatting;
import ru.nexusguard.protection.annotations.Native;

public class BindCommand extends CommandAbstract {
    public BindCommand() {
        super("bind");
    }

    @Native
    public void execute(LiteralArgumentBuilder<CommandSource> builder) {
        builder.then(literal("clear").executes((context) -> {
            int clearedCount = 0;
            for (Module module : Mendix.getInstance().getModuleManager().getModules()) {
                if (module.getKeyCode() != -1) {
                    module.setKeyCode(-1);
                    clearedCount++;
                }
            }
            String var10000 = String.valueOf(Formatting.GRAY);
            MessageUtil.displayInfo(var10000 + "Очистил бинды: " + String.valueOf(Formatting.WHITE) + clearedCount);
            return 1;
        }));
    }
}
Сложно
 
Назад
Сверху Снизу