view this prompt and generate that mod
📄
pasted-code-1784782332470.txt
txt
401 lines
▶
Create a professional Minecraft Fabric mod for Minecraft 1.21.11 named CopyGUI.
The purpose of the mod is to allow a player to open ANY inventory INVENTORY GUI on a server and instantly export that INVENTORY GUI into a DeluxeMenus YAML configuration that is ready to use without manual editing.
The generated YAML must preserve absolutely everything possible.
=================================================
MAIN FEATURES
=================================================
• Compatible with Fabric 1.21.11
• Client-side only
• No server installation required
• Lightweight
• Beautiful modern INVENTORY GUI
• Dark premium theme similar to CopyGUI
• Supports every Minecraft INVENTORY GUI
Supported inventories
✓ Chest
✓ Double Chest
✓ Barrel
✓ Hopper
✓ Dispenser
✓ Dropper
✓ Shulker Box
✓ Crafter
✓ Merchant Villager
✓ Anvil
✓ Smithing Table
✓ Loom
✓ Cartography
✓ Grindstone
✓ Stonecutter
✓ Beacon
✓ Brewing Stand
✓ Furnace
✓ Blast Furnace
✓ Smoker
✓ Custom plugin GUIs
✓ DeluxeMenus
✓ ShopGUIPlus
✓ CrazyCrates
✓ ExcellentCrates
✓ AxTrade
✓ AxAuction
✓ Any inventory using Bukkit Inventory API
=================================================
COPY BUTTON
=================================================
Press configurable key
Default
RIGHT SHIFT
Opens CopyGUI.
When an inventory is opened show
COPY MENU
Buttons
Copy DeluxeMenus
Copy Shopkeepers
Copy Inventory NBT
Open Folder
Settings
=================================================
DETECTION
=================================================
Automatically detect
Inventory title
Inventory size
Rows
Slots
Player inventory
NBT
Item Components (1.21)
CustomModelData
Enchants
Damage
Trim
Dyed Armor
Potion Data
Banner Patterns
Book Data
Firework Data
Player Heads
Leather Color
Food Components
Tool Components
Max Stack Size
Custom Name
Lore
Attributes
Hide Flags
Adventure Components
Persistent Data
Plugin NBT
Everything possible.
=================================================
TEXT COMPONENT SUPPORT
=================================================
Convert Minecraft Components into Legacy Color Codes.
Support
§
&
MiniMessage
Hex
RGB
Gradient
Example
⛹FC
Convert automatically.
=================================================
ITEM EXPORT
=================================================
Generate DeluxeMenus format.
Example
item_14:
material: PURPLE_CANDLE
slot: 14
display_name: '⛹FC&lAFK KEY'
hide_attributes: true
lore:
- 'AAAAAAShop'
- ''
- 'FFFFFFCollect some Shards and'
- 'FFFFFFGet awesome AFK Keys!'
- ''
- 'FFFFFF Price: ⛹FC&n20'
- ''
- 'FFFF55▶ FFFF55&l&nCLICKFFFFFF FFFF55to Purchase'
If the item contains
NBT
Components
Trim
Custom Model Data
Persistent Data
store them.
=================================================
CLICK COMMAND DETECTION
=================================================
Attempt to detect inventory click behaviour.
If impossible because the server never sends commands to clients,
generate placeholder section.
Example
click_commands:
- '[console] COMMAND_HERE'
Generate warning
Unable to detect server click commands.
Commands must be added manually.
=================================================
IGNORE ITEMS
=================================================
Whitelist
Blacklist
Ignore Glass Panes
Ignore AIR
Ignore Barrier
Ignore Placeholder Items
=================================================
SAVE
=================================================
Automatically create
CopyGUI/
Menus/
YYYY-MM-DD/
menu_name.yml
=================================================
INVENTORY GUI
=================================================
Create a premium animated INVENTORY GUI.
Colors
Dark
Black
Purple
Cyan
Smooth animations
Rounded panels
Minecraft styled.
=================================================
EXPORT
=================================================
Support
DeluxeMenus
Shopkeepers
JSON
NBT
Structure
Clipboard
=================================================
CONFIG
=================================================
config.json
Keybind
Folder
Theme
Ignore Items
Auto Copy
Auto Detect
Language
=================================================
PROJECT
=================================================
Java 21
Gradle
Fabric Loom
Fabric API
Mixin
Cloth Config
Mod Menu support
=================================================
CODE QUALITY
=================================================
Professional architecture.
Packages
INVENTORY GUI
export
inventory
component
yaml
nbt
config
util
render
mixin
Use Gson
SnakeYAML
Adventure
Text Component API
Proper comments
No deprecated code
=================================================
OUTPUT
=================================================
Generate the COMPLETE source code.
Generate
Gradle
Fabric.mod.json
Mixins
Textures
Icons
INVENTORY GUI
Every Java class
README
Build successfully without errors.
Ready to open inside IntelliJ IDEA or VS Code and compile immediately using Gradle.
Project foundation: create Gradle, Fabric metadata, client entrypoints, mixin configuration, and documentation.
Capture and model inventories: inspect the active handled screen, preserve slots and item components, and apply configurable ignore rules.
Export pipeline: generate DeluxeMenus YAML plus JSON, NBT text, structure, and clipboard outputs with dated menu folders.
CopyGUI interface: add the configurable Right Shift keybind, polished screen, settings screen, preview, and export actions.
Resources and integrations: add language, item models/icons, config persistence, and optional Mod Menu support.
CopyGuiExporterinitialized as a client-only Fabric 1.21.11 mod.Added Right Shift keybind, dark purple/cyan CopyGUI screen, settings screen, ignore rules, and folder opening.
Added inventory capture for handled screens, item IDs, counts, names, components, custom data, slot positions, and player-inventory filtering.
Added DeluxeMenus YAML generation with
COMMAND_HEREplaceholders, JSON, NBT-style, and structure-style exports.Added dated
CopyGUI/YYYY-MM-DD/export storage, clipboard support, Fabric metadata, Gradle setup, language resources, item models, mixin configuration, and README documentation.
The compilation failed with this error:
Compilation failed with 8 error(s):
ERROR in src/main/java/client/java/com/kodari/copyguiexporter/inventory/InventoryCapture.java at line 12: cannot find symbol
import net.minecraft.component.type.CustomData;
^
symbol: class CustomData
location: package net.minecraft.component.type
ERROR in src/main/java/client/java/com/kodari/copyguiexporter/INVENTORY GUI/CopyGuiScreen.java at line 73: cannot find symbol
context.drawBorder(left - 10, top - 10, 400, 240, 0xFF7D5CFF);
^
symbol: method drawBorder(int,int,int,int,int)
location: variable context of type DrawContext
ERROR in src/main/java/client/java/com/kodari/copyguiexporter/INVENTORY GUI/SettingsScreen.java at line 58: cannot find symbol
context.drawBorder(left - 10, top - 10, 340, 230, 0xFF26D9E8);
^
symbol: method drawBorder(int,int,int,int,int)
location: variable context of type DrawContext
ERROR in src/main/java/client/java/com/kodari/copyguiexporter/inventory/InventoryCapture.java at line 47: cannot find symbol
CustomData data = stack.get(DataComponentTypes.CUSTOM_DATA);
^
symbol: class CustomData
location: class InventoryCapture
ERROR in src/main/java/client/java/com/kodari/copyguiexporter/inventory/InventoryCapture.java at line 12: cannot find symbol
import net.minecraft.component.type.CustomData;
^
symbol: class CustomData
location: package net.minecraft.component.type
ERROR in src/main/java/client/java/com/kodari/copyguiexporter/inventory/InventoryCapture.java at line 47: cannot find symbol
CustomData data = stack.get(DataComponentTypes.CUSTOM_DATA);
^
symbol: class CustomData
location: class InventoryCapture
ERROR in src/main/java/client/java/com/kodari/copyguiexporter/INVENTORY GUI/CopyGuiScreen.java at line 73: cannot find symbol
context.drawBorder(left - 10, top - 10, 400, 240, 0xFF7D5CFF);
^
symbol: method drawBorder(int,int,int,int,int)
location: variable context of type DrawContext
ERROR in src/main/java/client/java/com/kodari/copyguiexporter/INVENTORY GUI/SettingsScreen.java at line 58: cannot find symbol
context.drawBorder(left - 10, top - 10, 340, 230, 0xFF26D9E8);
^
symbol: method drawBorder(int,int,int,int,int)
location: variable context of type DrawContext
=== COMPILATION ERROR ANALYSIS ===
MISSING CLASSES:
- CustomData
ACTION: Create these classes or check imports
MISSING METHODS:
- drawBorder(int,int,int,int,int)
ACTION: Check method names and signatures
FILES TO INVESTIGATE:
- src/main/java/client/java/com/kodari/copyguiexporter/inventory/InventoryCapture.java
- src/main/java/client/java/com/kodari/copyguiexporter/INVENTORY GUI/CopyGuiScreen.java
- src/main/java/client/java/com/kodari/copyguiexporter/INVENTORY GUI/SettingsScreen.java
- src/main/java/client/java/com/kodari/copyguiexporter/inventory/InventoryCapture.java
- src/main/java/client/java/com/kodari/copyguiexporter/INVENTORY GUI/CopyGuiScreen.java
- src/main/java/client/java/com/kodari/copyguiexporter/INVENTORY GUI/SettingsScreen.java
Please fix this error by creating a new artifact with the corrected code.
Replace the obsolete custom-data type with the Yarn 1.21.11 component type.
Replace unavailable
DrawContext.drawBordercalls with fourfillcalls that render the same border.Apply the fixes to the three affected client source files.
Fixed the compilation errors:
Replaced obsolete
CustomDatawith Yarn 1.21.11’sNbtComponent.Replaced both unavailable
DrawContext.drawBorder(...)calls with equivalentfill(...)border rendering.Updated:
src/client/java/com/kodari/copyguiexporter/inventory/InventoryCapture.javasrc/client/java/com/kodari/copyguiexporter/gui/CopyGuiScreen.javasrc/client/java/com/kodari/copyguiexporter/gui/SettingsScreen.java
change that key into h and that i will open a INVENTORY GUI and then i will press h so a INVENTORY GUI will open for copying that dmenu INVENTORY GUI\
Locate the current keybinding and inventory-screen flow.
Update the key to
Hand ensure pressing it opens the inventory-copy GUI.Patch the affected client files and preserve the existing GUI behavior.
Changed the inventory GUI key from Right Shift to H.
Press H to open the inventory-copy GUI. Press H again while it is open to close it.
package com.kodari.copyguiexporter;
import net.fabricmc.api.ModInitializer;
public final class CopyGuiExporter implements ModInitializer {
public static final String MOD_ID = "copyguiexporter";
@Override
public void onInitialize() {
}
}