📄
pasted-code-1793568257956.txt
txt
43 lines
▶
Objective: Create a Minecraft mod named AutoShematic for Minecraft 1.21.11 built on the Fabric toolchain.
Primary Purpose: To serve as a powerful, lightweight, and highly aesthetic tool for rapid city map creation by automating the construction of buildings, roads, and infrastructure from pre-saved schematic blueprints.
1. Configuration & Initial Setup
• Folder Generation: Upon the first launch, the mod must automatically create a folder named Shema inside the standard Minecraft configuration directory (.minecraft/config/Shema). This folder must be forced to appear at the very top/first in the config directory list.
• File Type: The mod must scan and read files exclusively with the .schem extension (standard Sponge/WorldEdit schematic format) from this folder.
2. Aesthetics, Smooth Visuals & Rendering
• GUI Animations: The menu (opened via the U key) must feature smooth transitions for opening and closing (e.g., a gentle background blur and a clean fade-in/fade-out animation of the main window). Resizing the window must feel responsive and fluid without UI stutter.
• Hologram Effects: The structure hologram must look futuristic and visually appealing. Instead of snapping instantly into existence, blocks should smoothly fade into view or "grow" out of thin air when selected. The hologram must use a semi-transparent shader with a soft neon/glowing blueprint effect so it doesn't obstruct vision or strain the eyes while moving through the city.
• Natural Bot Movement: When the builder bot is active, its head rotations and aiming transitions must be smooth (utilizing fluid interpolation for Pitch and Yaw). It should look like a natural, skilled human player building the city, avoiding any robotic, instant, or jagged "cheat-like" snap movements.
3. Keybinds & Controls (Rebindable in Controls Menu)
• Key 1: U (Default) — Toggles the GUI menu or manages the active hologram.
• Key 2: ; (Default) — Modifier key. Holding this key down while spinning the mouse scroll wheel rotates the schematic.
4. GUI Layout & Navigation (Key U)
• Window Behavior: Pressing U opens a resizable and draggable menu window. It can be dynamically resized by dragging its bottom-right corner.
• Closing: Features a prominent red close button (X) in the top-left corner, and can also be dismissed instantly by pressing the ESC key (default vanilla behavior, no rebind needed).
• Menu Tabs:
• Tab 1 (Schematics List): Displays all available .schem files inside config/Shema. Clicking a file smoothly closes the menu and projects the semi-transparent building hologram.
• Tab 2 (Settings): Features a custom slider to adjust the bot's building speed (affects block placement tick rate).
• Toggle Cycle: If a hologram is currently active (but not yet placed), pressing U will hide/clear the hologram instantly instead of opening the menu. Pressing U once more will reopen the schematic list window.
5. Hologram Preview Mechanics
• Selecting a blueprint spawns a glowing, semi-transparent hologram of the building.
• Movement: The hologram is not initially locked to the world grid; it smoothly follows the player's movements to allow precise positioning of the city building or road.
• Rotation: Holding down the ; key and scrolling the mouse wheel smoothly rotates the entire structure around its central axis.
• Placement Confirmation (LMB / Left Click): Snaps and locks the hologram to the current world coordinates and immediately deploys the Auto-Builder Bot.
• Instant Cancellation (RMB / Right Click): Pressing Right Click at any time instantly cancels the preview state, removes the hologram, or shuts down the active builder bot completely.
6. Fully Autonomous Builder Bot Logic
• Full Control Takeover: Once building begins, the bot takes absolute control over all character inputs: camera look, hotbar/inventory switching, crafting/shuffling, and character movement.
• Pathfinding & Mobility: The bot features smart autonomous pathfinding. It will automatically walk, run, jump, or fly (if the player is in Creative Mode) to reach the required block coordinates to complete the structure.
• Strict Speed Limit: The bot must move strictly at normal, vanilla Minecraft speeds (normal sprint or standard creative flight). No teleportation or speed hacks are allowed, ensuring the city map builds reliably without chunk loading glitches.
• Construction Routine: The bot scans the inventory, automatically moves required blocks to the hotbar, smoothly aims at the structure grid, and places the blocks.
• Speed Adjustments: The slider in Tab 2 changes only the frequency of the building ticks (how fast the bot switches items, aims, and places blocks). The character's physical movement speed (walking/flying) always remains completely vanilla and natural.
AutoShematic can target Fabric 1.21.11, but two requirements need qualification before implementation:
Minecraft cannot force
config/Shemato appear first in an operating system’s folder listing.An autonomous builder can use normal player movement and placement, but cannot guarantee success on every server: permissions, inventory, reach, unloaded chunks, and server rules can prevent construction.
Should the first version target singleplayer and servers where the player has building permission, with the bot stopping and reporting when it cannot proceed?
📄
pasted-code-1793568580936.txt
txt
11 lines
▶
Thank you for the clarification! Let's address both points to align with my vision:
1. Folder Listing: You are completely right. Let's just keep the folder named Shema and let the operating system handle the sorting alphabetically. It's totally fine, I will easily find it on the letter S.
2. Multiplayer & Safety Safeguards: Yes, let's make the first version target Singleplayer and Multiplayer servers where the player has building permissions.
3. Autonomous Behavior & Error Handling: Since the bot will have full control over movement and building to build city maps automatically, it must react smartly to server constraints. If the bot encounters an obstacle it cannot bypass — such as:
* Running out of required blocks in the inventory;
* Reaching a server-side protected region (e.g., WorldGuard/Spawn protection) where building is blocked;
* Blocks failing to place due to server lag, anti-cheat, or reach limits;
* Trying to build in unloaded chunks.
The bot must immediately stop all actions, release control back to the player, and print a clear error message in the chat (for example: "[AutoShematic] Paused: Out of Blocks!" or "[AutoShematic] Paused: Region Protected!").
Set up the Fabric project and create
config/Shemaon launch.Add schematic selection, preview controls, and builder safeguards.
Created the Fabric project foundation; it creates config/Shema on launch.
Not yet implemented: schematic loading, the GUI, holograms, builder automation, and safety safeguards. This is not yet a usable AutoShematic release.
package com.autoshematic;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.loader.api.FabricLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class AutoShematic implements ModInitializer {
private static final Logger LOGGER = LoggerFactory.getLogger("autoshematic");
@Override
public void onInitialize() {
Path schematicDirectory = FabricLoader.getInstance().getConfigDir().resolve("Shema");
try {
Files.createDirectories(schematicDirectory);
} catch (IOException e) {
LOGGER.error("Could not create schematic directory {}", schematicDirectory, e);
}
}
}