tol_1

Create a small mod that lets player have 3 new keybinds. One keybind will run /ra 1, the other /ra 2, the last one /ra 3

Kodari AI
KodariMay 4 at 2:34 am 4,594 (v2)

I’ll create a client-side Fabric mod that adds 3 keybinds for quick access to /ra commands.

RAKeys
A lightweight Fabric client-side mod that adds three customizable keybinds to quickly execute /ra 1, /ra 2, and /ra 3 commands. Players can configure the keybinds through Minecraft's controls menu. Perfect for servers using RA (Rank Access) or similar command systems where quick command execution is needed. Compatible with Minecraft 1.20+ and requires Fabric API.

Created a Fabric client-side mod with three keybinds (default: R, T, Y) that execute /ra 1, /ra 2, and /ra 3 respectively. Players can rebind them in Minecraft’s controls menu under the “RA Keys” category.

tol_1

Can we add the neccessary compilation files

Kodari AI
KodariMay 4 at 2:38 am 5,473 (v2)

I’ll add the Gradle wrapper files needed to compile the mod without requiring Gradle to be pre-installed.

Added Gradle wrapper files. The project can now be compiled using ./gradlew build (Linux/Mac) or gradlew.bat build (Windows) without needing Gradle pre-installed.

Kodari can make mistakes. Review important code before using.
Files
gradle
src
.gitignore
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle
Code
10 478
src/main/java/com/rakeys/RAKeys.java
package com.rakeys;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import org.lwjgl.glfw.GLFW;

public class RAKeys implements ClientModInitializer {

    private static KeyBinding ra1Key;
    private static KeyBinding ra2Key;
    private static KeyBinding ra3Key;

    @Override
    public void onInitializeClient() {
        ra1Key = KeyBindingHelper.registerKeyBinding(new KeyBinding(
                "key.rakeys.ra1",
                InputUtil.Type.KEYSYM,
                GLFW.GLFW_KEY_R,
                "category.rakeys.main"
        ));

        ra2Key = KeyBindingHelper.registerKeyBinding(new KeyBinding(
                "key.rakeys.ra2",
                InputUtil.Type.KEYSYM,
                GLFW.GLFW_KEY_T,
                "category.rakeys.main"
        ));

        ra3Key = KeyBindingHelper.registerKeyBinding(new KeyBinding(
                "key.rakeys.ra3",
                InputUtil.Type.KEYSYM,
                GLFW.GLFW_KEY_Y,
                "category.rakeys.main"
        ));

        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            if (client.player == null) return;

            if (ra1Key.wasPressed()) {
                client.player.networkHandler.sendCommand("ra 1");
            }

            if (ra2Key.wasPressed()) {
                client.player.networkHandler.sendCommand("ra 2");
            }

            if (ra3Key.wasPressed()) {
                client.player.networkHandler.sendCommand("ra 3");
            }
        });
    }
}