Nikša Milosavljević
📎 1 file 1,275 chars
📄
pasted-code-1788017056782.txt
txt 42 lines
▶
I want you to create a Minecraft Java Fabric mod for version 1.21.11 called "Auto Excavator".

The mod is for singleplayer and should automate the player's mining.

The player presses a key (default K) to open a GUI. In the GUI, the player enters two opposite corner coordinates:

Corner 1:
X, Y, Z

Corner 2:
X, Y, Z

The mod calculates the rectangular 3D area between these coordinates.

After pressing START, the mod should control the player's character and automatically:

walk through the selected area,
select appropriate tools from the hotbar,
physically break the blocks,
mine the area layer by layer,
avoid unnecessary falls,
continue until the entire selected area is empty.

The blocks must actually be mined by the player. Do NOT use /fill, WorldEdit, instant block deletion, or commands that simply remove the blocks.

Add:

K = open Auto Excavator GUI
P = emergency STOP
Start button
Stop button
coordinate fields for both corners
progress indicator
selected-area preview if possible

Example:
Corner 1 = 100, 70, 100
Corner 2 = 152, 44, 107

This should result in the player automatically mining the entire 52×26×7 area.

Make the project specifically compatible with Minecraft Java 1.21.11 + Fabric and provide a buildable project and .jar file if supported.
Kodari AI
KodariAug 29 at 3:28 pm 2
AutoExcavator
A Fabric mod for Minecraft 1.21.11 that automates player mining. Press K to open a GUI where you input two corner coordinates defining a 3D rectangular area. The mod then autonomously controls the player character to walk through the region, select appropriate hotbar tools, physically break blocks layer by layer, avoid falls, and continue until the entire volume is excavated. Features include Start/Stop buttons, emergency stop with P key, progress indicator, and optional area preview. Blocks are mined genuinely by the player character—no commands, WorldEdit, or instant deletion.

I’ll create the complete Fabric 1.21.11 project in one pass:

  1. Gradle/Fabric metadata and source-set configuration.

  2. Client keybinds, GUI, coordinate validation, progress display, and area preview.

  3. Player-driven excavation controller using legitimate client block-breaking interactions.

  4. Required assets, mixin metadata, and language/model resources.

Created the Fabric 1.21.11 Auto Excavator project.

  • Added Gradle/Loom setup targeting Minecraft 1.21.11, Yarn mappings, Fabric Loader, and Fabric API.

  • Added K key to open the coordinate GUI.

  • Added P emergency stop and GUI STOP button.

  • Added coordinate fields for both corners with area-size validation.

  • Added layer-by-layer excavation using the player’s normal block-breaking interaction.

  • Added automatic hotbar tool selection based on mining speed.

  • Added safe movement checks to avoid unsupported falls and basic obstacle jumping.

  • Added live HUD progress tracking.

  • Added Fabric metadata and English localization.

A .jar was not generated because build execution is unavailable in this environment.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
9 547
src/main/java/com/kodari/autoexcavator/AutoExcavator.java
package com.kodari.autoexcavator;

import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AutoExcavator implements ModInitializer {
    public static final String MOD_ID = "autoexcavator";
    public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    @Override
    public void onInitialize() {
    }
}