voreixz
šŸ“Ž 1 file 2,969 chars
šŸ“„
pasted-code-1787307457886.txt
txt 153 lines
ā–¶
# Macro Recorder Mod (Fabric 1.21.1+) – AI Development Prompt

Create a Minecraft Fabric mod called **Macro Recorder** that allows players to create, edit, save, and run their own macros entirely in-game.

## Core Features

### Macro Recording

* Press a configurable hotkey (default: F6) to start recording.
* Press the same hotkey again to stop recording.
* Record:

  * Keyboard inputs
  * Mouse clicks
  * Mouse movement (optional toggle)
  * Delays between actions
* Display a small HUD indicator while recording:

  * šŸ”“ Recording
  * ā¹ Stopped
  * ā–¶ Playing

### Macro Management INVENTORY GUI

* Open with a configurable hotkey (default: Right Shift).
* Modern dark-themed interface.
* Features:

  * Create Macro
  * Rename Macro
  * Delete Macro
  * Duplicate Macro
  * Import Macro
  * Export Macro
  * Search Bar
  * Category/Folder System

### Macro Editor

* View all recorded actions in a timeline.
* Edit:

  * Delays
  * Key presses
  * Mouse clicks
  * Repeat counts
* Drag-and-drop action ordering.
* Add actions manually without recording.

### Playback System

* Assign a hotkey to each macro.
* Start/stop macros instantly.
* Loop options:

  * Once
  * Infinite
  * Custom amount
* Playback speed slider:

  * 0.25x
  * 0.5x
  * 1x
  * 2x
  * 4x

### Profiles

* Create multiple profiles.
* Each profile stores:

  * Macros
  * Keybinds
  * Settings
* Quick profile switching.

### Conditions System

Allow optional conditions before executing actions:

* Health percentage
* Hunger percentage
* Item held
* Armor equipped
* Player coordinates
* Looking at block/entity
* Inventory contains item

### Safety Features

* Emergency stop key (default: F8).
* Disable macros automatically when:

  * Disconnected from server
  * Game crashes
  * World changes (optional setting)

### File Storage

Save macros as JSON files:

```json
{
  "name": "AutoMine",
  "hotkey": "F7",
  "loop": true,
  "actions": [
    {
      "type": "key_press",
      "key": "W",
      "duration": 500
    },
    {
      "type": "left_click",
      "delay": 100
    }
  ]
}
```

### Settings

* Custom hotkeys
* Theme selection
* Enable/disable mouse recording
* Playback speed
* HUD position
* HUD scale

### Technical Requirements

* Fabric API
* Cloth Config support
* Mod Menu integration
* JSON macro storage
* Lightweight performance impact
* Compatible with Minecraft 1.21.1+

### UI Design

The INVENTORY GUI should resemble a professional macro recorder application with:

* Rounded buttons
* Smooth animations
* Dark theme
* Scrollable macro list
* Search functionality
* Clean modern layout

### Goal

The mod should function similarly to desktop macro recorder software but fully integrated into Minecraft, allowing players to easily create, manage, and execute custom macros through an intuitive interface.
Kodari AI
KodariAug 21 at 10:22 am 3
  1. Core project: create the Fabric 1.21.11 build, metadata, and resources.

  2. Macro engine: add JSON persistence, recording, playback, profiles, and safety controls.

  3. Client UX: add keybinds, inventory-style management/editor screen, and HUD status.

  4. Input hooks: capture keyboard, mouse clicks, and optional mouse movement through client mixins.

Created the Fabric 1.21.11 Macro Recorder project with:

  • Fabric Loom 1.14 setup targeting Minecraft 1.21.11, Yarn mappings, Java 21, and split client source sets.

  • F6 recording, Right Shift manager screen, and F8 emergency stop keybinds.

  • Keyboard, mouse-click, and optional mouse-movement recording.

  • JSON macro persistence under config/macro_recorder/macros/.

  • Macro playback with speed and loop metadata.

  • Dark inventory-style macro manager with search, create, rename, duplicate, delete, play, add-delay, and remove-action controls.

  • Recording/playback HUD indicator.

  • Client-only keyboard and mouse mixins with dedicated-server-safe mixin configuration.

  • English localization resources.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
18 862
src/main/java/com/kodari/macrorecorder/MacroRecorder.java
package com.kodari.macrorecorder;

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

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

    @Override
    public void onInitialize() {
        LOGGER.info("Macro Recorder loaded");
    }
}