Krystian K

Create a client-side Fabric mod for Minecraft 1.21.4 that works only in singleplayer.

Keybind: Pressing the "P" key should open a custom GUI.

GUI Design: The GUI should have a neon style with animated, glowing borders that cycle through yellow, purple, and other colors. Include simple UI click sounds when buttons are pressed.

GUI Features:

A toggle button labeled "Kop" (Area Mining) that can be turned ON or OFF.

A slider to set the mining radius (from 1 to 6 blocks).

A slider to set the mining speed (from 0.5x to 5x).

Core Mechanic: When "Kop" is enabled, breaking a block should also break all blocks within the selected radius (e.g., 3, 4, or 5 blocks). This should work with any tool (pickaxe, axe, shovel, etc.) and only affect the singleplayer world.

Kodari AI
KodariNov 11 at 10:55 am 3
NeonAreaMining
A client-side Fabric mod for Minecraft 1.21.4 singleplayer, adding a neon-styled GUI opened with the P key. The interface features animated glowing borders cycling through yellow and purple, UI click sounds, a "Kop" toggle for area mining, and sliders for radius (1-6 blocks) and speed (0.5x-5x). When enabled, breaking any block also breaks surrounding blocks within the selected radius, working with all tool types.
  1. Set up the Fabric 1.21.4 client-only project and keybind.

  2. Add the animated neon screen with the Kop toggle and both sliders.

  3. Add singleplayer-only area breaking and mining-speed mixins.

Created the client-only Fabric 1.21.4 mod. Press P in singleplayer to open the animated neon GUI, toggle Kop, set the mining radius from 1–6 blocks, and adjust mining speed from 0.5×–5×. When enabled, it breaks nearby blocks in a spherical radius using the held tool and applies the speed multiplier; GUI controls play click sounds.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
10 383
src/main/java/com/kodari/kop/KopClient.java
package com.kodari.kop;

import com.kodari.kop.screen.KopScreen;
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.MinecraftClient;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import org.lwjgl.glfw.GLFW;

public final class KopClient implements ClientModInitializer {
    public static boolean kopEnabled;
    public static int miningRadius = 3;
    public static float miningSpeed = 1.0F;

    private KeyBinding openScreenKey;

    @Override
    public void onInitializeClient() {
        openScreenKey = KeyBindingHelper.registerKeyBinding(new KeyBinding(
                "key.kop.open_gui",
                InputUtil.Type.KEYSYM,
                GLFW.GLFW_KEY_P,
                "category.kop"
        ));

        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            if (openScreenKey.wasPressed()
                    && client.isInSingleplayer()
                    && client.player != null) {
                client.setScreen(new KopScreen());
            }
        });
    }

    public static void playClickSound() {
        MinecraftClient client = MinecraftClient.getInstance();
        client.getSoundManager().play(net.minecraft.client.sound.PositionedSoundInstance.master(
                net.minecraft.sound.SoundEvents.UI_BUTTON_CLICK,
                1.0F
        ));
    }
}