Kodari Development Prompt: Shem's Spear Mace Optimizer 1. Project Overview
Create a fully functional Minecraft Java Edition 1.21.11 Fabric client-side mod named Shem's Spear Mace Optimizer.
The mod is designed to organize and automate configurable weapon swaps and attacks for spear, mace, and axe PvP, with player hitbox visualization.
Mandatory requirements Target Minecraft Java Edition 1.21.11. Use Fabric Loader and the correct compatible Fabric API. Integrate with Mod Menu and provide a complete configuration screen. Every feature, timing, slot, trigger, and supported behavior must be configurable through Mod Menu. Include individual enable/disable switches for every feature. Support customizable keybinds. Preserve settings between game sessions. Prevent actions from different features from interfering with one another. Use actual Minecraft 1.21.11 mechanics and APIs rather than inventing unsupported behavior. Do not include anti-cheat bypasses or stealth mechanisms. 2. Feature One: Auto Stun Slam Purpose
Automate a configurable weapon-switch sequence after hitting an opponent's shield with an axe.
Default behavior The player holds an axe. The player successfully hits a player who is blocking with a shield. The mod detects the shield interaction. Wait for the configured delay, defaulting to 10 milliseconds. Switch to hotbar slot 6. Wait 5 ticks after the slot switch. Perform one left-click attack attempt. Configurable options Enable/disable Auto Stun Slam. Source weapon requirement: axe. Trigger condition: shield interaction. Destination slot, default 6. Delay before switching, default 10 ms. Delay after switching, default 5 ticks. Optional return to the original slot. Custom activation keybind, if applicable. Minimum interval between activations. Cancel action when the target disappears, the player dies, or the screen loses focus. Action priority when another feature is running. Technical requirement
Detect actual shield interactions as reliably as possible using information available to the client. Do not trigger repeatedly from a single interaction.
If the server does not expose enough information to confirm that a shield was hit, document the limitation and use the most reliable available client-side event.
- Feature Two: Auto Lunge Swap Purpose
Automate the user's configured slot-switch sequence for lunge swapping.
Default behavior The player selects hotbar slot 4. The player left-clicks. The mod records the activation and schedules the swap. After 10 ticks, switch to hotbar slot 1. Return to hotbar slot 4 according to the configured return delay. Allow the sequence to repeat when the next valid activation occurs. Configurable options Enable/disable Auto Lunge Swap. Activation slot, default 4. Destination slot, default 1. Return slot, default 4. Initial delay, default 10 ticks. Delay before returning to slot 4. Optional automatic return. Custom keybind. Minimum interval between activations. Maximum number of queued actions. Cancel pending swaps when the player changes slots manually. Cancel pending swaps when the player dies or disconnects. Action priority and conflict handling.
The mod must not assume that switching slots automatically guarantees a successful lunge. Use the actual mechanics supported by Minecraft 1.21.11 and the installed spear implementation.
- Feature Three: Player-Only Hitboxes Purpose
Display player hitboxes to assist with visual awareness during PvP.
Required behavior Display hitboxes for players only. Do not display hitboxes for mobs, dropped items, projectiles, or other non-player entities. Support a dedicated toggle keybind. Provide a visible indication of whether the feature is enabled. Configurable options Enable/disable player hitboxes. Toggle keybind. Hitbox line color. Line thickness, within reasonable rendering limits. Maximum display distance. Render through blocks: configurable where technically supported. Show invisible players: configurable where supported. Render local player's hitbox: on/off. Display players in first-person and third-person modes. Rendering performance options.
Use the actual bounding boxes supplied by Minecraft. Do not artificially enlarge server hitboxes or alter attack reach.
- Feature Four: Auto Spear-Range Mace Swap Purpose
Attempt a mace attack after a left-click while the player is using hotbar slot 1 and an entity is within the configured spear-range threshold.
Default behavior The player selects hotbar slot 1. The player left-clicks. The mod checks whether an eligible entity is within the configured spear-range threshold. If the condition is satisfied, switch to hotbar slot 6. Wait 5 ticks by default. Perform one left-click attack attempt with the mace. Optionally return to the original slot if that option is enabled. Configurable options Enable/disable Auto Spear-Range Mace Swap. Activation slot, default 1. Mace slot, default 6. Target type: players, all eligible entities, or players only. Detection range, based on configurable spear-range settings. Delay after switching, default 5 ticks. Optional return to the original slot. Return delay. Custom activation keybind. Minimum interval between attacks. Maximum pending actions. Cancellation conditions. Action priority. Important combat limitation
Detecting a target within spear range does not extend the mace's actual attack range. The feature must use normal Minecraft attack validation and must not promise a successful mace hit when the target is outside the mace's legitimate reach.
If the installed spear mod changes attack reach, detect its actual supported range when possible. Do not assume every server uses identical spear mechanics.
- Feature Five: Auto Slot-5-to-Slot-9 Swap Purpose
Automate a configurable slot switch and subsequent attack after a left-click while using hotbar slot 5.
Default behavior The player selects hotbar slot 5. The player left-clicks. The mod schedules the action. Switch to hotbar slot 9. Wait 7 ticks by default. Perform one left-click attack attempt. Optionally return to slot 5. Configurable options Enable/disable the feature. Activation slot, default 5. Destination slot, default 9. Attack delay, default 7 ticks. Optional return to slot 5. Return delay. Custom keybind. Minimum interval between activations. Cancellation conditions. Action priority and conflict handling.
Do not repeatedly trigger the sequence from a single click. Require a new valid activation for each repeat unless an explicit repeat option is enabled.
- Human-Like Action Timing and Input Handling
All automated actions must follow technically possible input timings and execute in a predictable order.
Required behavior Provide configurable delays in milliseconds or ticks, as appropriate. Preserve the requested defaults wherever technically feasible. Use the appropriate client input and game scheduling mechanisms. Do not assume a 10 ms delay means Minecraft will process an action exactly 10 ms later. Account for Minecraft's normal 20-tick-per-second game loop, where one tick is approximately 50 ms. Validate all user-configured timing values. Warn about settings that are too short, conflict with game timing, or are unlikely to execute reliably. Prevent duplicate clicks and conflicting slot changes. Avoid sending actions while a screen or menu prevents normal gameplay input. Do not promise perfectly human behavior or undetectability. Timing defaults Action Default timing Auto Stun Slam pre-switch delay 10 ms Auto Stun Slam post-switch delay 5 ticks Auto Lunge Swap initial delay 10 ticks Spear-range mace attack delay 5 ticks Slot-5-to-slot-9 attack delay 7 ticks
For tick-based actions, schedule execution using the appropriate client tick lifecycle. For millisecond-based delays, use a suitable scheduling mechanism without blocking the client thread, then execute game-state changes on the correct client thread.
- Mace Profile
Create a dedicated Mace Profile to organize the mace-related features.
Required behavior Store separate settings for each feature. Allow the user to enable or disable each feature independently. Allow mace-related timing and slot settings to be configured separately. Allow the user to switch profiles through a configurable keybind. Preserve the selected profile between sessions. Do not silently change settings belonging to other profiles.
The Mace Profile must not override an individual feature's settings without an explicit user-configured rule.
- Complete Mod Menu Configuration
This requirement applies to every feature without exception.
Create a polished, organized Mod Menu configuration screen titled Shem's Spear Mace Optimizer.
Required configuration categories
General Settings
Master enable/disable toggle. Emergency disable keybind. Global action priority. Notification settings. Configuration reset and restore defaults.
Auto Stun Slam
Enable/disable. Timing. Destination slot. Return behavior. Trigger conditions. Cooldown and cancellation settings.
Auto Lunge Swap
Enable/disable. Activation and destination slots. Initial and return delays. Repeat behavior. Cooldown and cancellation settings.
Player Hitboxes
Enable/disable. Toggle keybind. Color, thickness, distance, and visibility options.
Auto Spear-Range Mace Swap
Enable/disable. Activation and mace slots. Range threshold. Attack delay. Return behavior. Target selection and cooldown.
Auto Slot-5-to-Slot-9 Swap
Enable/disable. Activation and destination slots. Attack delay. Return behavior. Cooldown and cancellation settings.
Mace Profile
Profile selection. Profile-specific settings. Profile activation keybind.
Advanced Settings
Action queue size. Action cancellation rules. Conflict resolution. Timing validation. Debug logging. Configuration import/export, if practical. User interface requirements Use clear labels and tooltips. Show the default value for each setting. Explain timings in both ticks and milliseconds when appropriate. Validate hotbar slots to remain within 1–9. Provide sensible minimum and maximum values. Make it easy to restore default settings. Save changes persistently. Ensure every implemented feature has its own settings page or clearly labeled section. Do not leave hardcoded behavior that bypasses the configuration system. 10. Action Queue and Conflict Prevention
All automated features must use a shared action-management system.
Requirements Prevent two features from changing the selected slot simultaneously. Prevent queued actions from executing after their activation has become invalid. Support configurable action priorities. Support cancellation of pending actions. Cancel actions on death, disconnect, world change, or other relevant invalidating events. Avoid duplicate actions from a single input. Release any synthetic input state safely if an action is interrupted. Ensure one feature cannot leave another feature stuck in an unintended state. Provide a debug log showing the feature, trigger, scheduled action, selected slot, and cancellation reason.
If two features trigger at the same time, use a predictable priority system and expose its configuration in Mod Menu.
- Compatibility and Performance Target Minecraft Java 1.21.11 specifically. Use compatible Fabric Loader, Fabric API, and Mod Menu dependencies. Include correct fabric.mod.json metadata. Use the appropriate Java version and Gradle setup for the target Minecraft release. Avoid unnecessary mixins. If mixins are required, use stable injection points and fail safely if an injection cannot be applied. Do not block the client thread. Keep hitbox rendering lightweight. Handle missing items, empty slots, and incompatible spear implementations safely. Do not crash when a configured slot is empty. Handle multiplayer disconnects and world transitions correctly.
The mod must be client-side where possible. Any functionality that requires server cooperation must be documented rather than falsely advertised as client-only.
- Testing and Acceptance Criteria
Before considering the mod complete, verify the following:
The mod loads on Minecraft Java 1.21.11 Fabric. The Mod Menu entry appears with the exact name Shem's Spear Mace Optimizer. Every feature can be enabled and disabled independently. All settings persist after restarting the game. Auto Stun Slam follows the configured trigger, swap, and attack sequence. Auto Lunge Swap follows the configured slot sequence without overlapping actions. Player hitboxes exclude non-player entities. The spear-range feature checks the configured range without granting artificial mace reach. The slot-5-to-slot-9 feature follows the configured delay. The emergency disable key immediately stops new automated actions and safely cancels pending actions. Simultaneous triggers do not cause duplicate or contradictory inputs. Empty slots, invalid configurations, death, and disconnects are handled safely. No feature relies on a hardcoded setting when Mod Menu exposes that setting. The mod compiles successfully and produces a working Fabric .jar. 13. Final Deliverables
Provide:
Complete source code. Gradle build files. Fabric metadata. Required dependency declarations. Mod Menu configuration implementation. Default configuration values. Instructions for building and installing the mod. A compiled .jar if the development environment supports building it. A concise list of tested features and any technical limitations.
Do not return only pseudocode, mockups, or incomplete class files. Implement the complete mod, compile it, resolve build errors, and verify the resulting artifact whenever possible.
If a requested behavior is unsupported by the actual Minecraft 1.21.11 APIs, explain the limitation and implement the closest technically valid alternative rather than claiming it works when it does not.