raj har

Create LuffyHUD, a Minecraft Java Fabric client-side mod for Minecraft 1.21.11. Generate and compile a working downloadable JAR.

Features:

  • Save, load, rename and delete multiple inventory kit presets locally.
  • Custom teammate display names and colors.
  • Custom crosshair styles, size, gap, thickness and color.
  • A polished dark-blue, electric-blue and cyan GUI.
  • Tabs for Kits, Teammates, Crosshair and Settings.
  • A keybind to open the menu.
  • Save settings across game restarts.

Use compatible Fabric APIs, implement real functionality, and fix compilation errors. Do not return only source code. Provide the compiled JAR and installation instructions. If a feature is blocked by multiplayer server restrictions, explain the limitation.

Kodari AI
KodariOct 19 at 10:13 am 4
LuffyHUD
LuffyHUD is a client-side Fabric mod for Minecraft 1.21.11 featuring a dark-blue, electric-blue and cyan GUI with tabs for Kits, Teammates, Crosshair and Settings. It allows saving, loading, renaming and deleting inventory kit presets locally, custom teammate display names and colors, custom crosshair styles with adjustable size, gap, thickness and color, plus a configurable keybind to open the menu. All settings persist across game restarts via JSON configuration files. The mod provides real functional customization through Fabric's rendering and input APIs.
  1. Set up the Fabric 1.21.11 client project and persistent local data.

  2. Implement kit presets, teammate labels, crosshair customization, and keybind handling.

  3. Build the dark-blue owo-ui menu with Kits, Teammates, Crosshair, and Settings tabs.

Created LuffyHUD for Fabric 1.21.11 with the four-tab dark-blue owo-ui menu, Right Shift keybind, persistent settings, locally saved inventory kits, custom teammate labels/colors, and configurable crosshair styles and sizing.

Inventory limitation: Kits can be saved, renamed, and deleted locally in any world. Loading restores inventory only in singleplayer; multiplayer servers control inventory, so the mod cannot apply a preset there.

To build and download it in Kodari:

  1. Click Compile in the top bar (on phone: ⋮ → Compile Project).

  2. Click Compile in the window.

  3. When it succeeds, click Download. Install the downloaded mod and its bundled owo-lib dependency in your Fabric 1.21.11 mods folder; Fabric API is also required.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
settings.gradle
Code
12 954
src/client/java/com/luffyhud/client/LuffyHudClient.java
package com.luffyhud.client;

import com.luffyhud.client.mixin.PlayerEntityRendererMixin;
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.fabricmc.fabric.api.client.rendering.v1.hud.HudElementRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.hud.VanillaHudElements;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.util.Identifier;
import org.lwjgl.glfw.GLFW;

public final class LuffyHudClient implements ClientModInitializer {
    private static final KeyBinding OPEN_MENU = KeyBindingHelper.registerKeyBinding(
            new KeyBinding("key.luffyhud.open_menu", GLFW.GLFW_KEY_RIGHT_SHIFT,
                    KeyBinding.Category.create(Identifier.of("luffyhud", "main")))
    );

    @Override
    public void onInitializeClient() {
        HudConfig.load();

        HudElementRegistry.replaceElement(VanillaHudElements.CROSSHAIR, vanilla -> (context, tickCounter) -> {
            MinecraftClient client = MinecraftClient.getInstance();
            if (!HudConfig.customCrosshairEnabled) {
                vanilla.render(context, tickCounter);
                return;
            }

            if (client.player == null || client.options.hudHidden || !client.options.getPerspective().isFirstPerson() || client.player.isSpectator()) {
                return;
            }

            HudOverlays.renderCrosshair(context);
        });

        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            while (OPEN_MENU.wasPressed()) {
                if (client.currentScreen == null) {
                    client.setScreen(new LuffyHudScreen());
                }
            }
        });
    }
}