📄
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.
I’ll create the complete Fabric 1.21.11 project in one pass:
Gradle/Fabric metadata and source-set configuration.
Client keybinds, GUI, coordinate validation, progress display, and area preview.
Player-driven excavation controller using legitimate client block-breaking interactions.
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
Kkey to open the coordinate GUI.Added
Pemergency 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.
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() {
}
}