📄
pasted-code-1792674459744.txt
txt
202 lines
▶
# Counter32 Client – Minecraft Fabric Mod
Create a custom Minecraft client-side mod called **Counter32 Client** for Minecraft Java Edition 1.21.4 using Fabric.
The client should have a modern, polished, animated GUI inspired by the Lunar Client mod menu shown in the reference image.
## 1. Opening the Client GUI
- Pressing **Right Shift** opens the Counter32 Client GUI.
- Pressing Right Shift again or ESC closes the GUI.
- The GUI must work while playing Minecraft, including on multiplayer servers.
- The GUI should appear centered on the screen.
- The background of the GUI should be dark navy blue with slight transparency.
- The Minecraft world should remain visible behind the GUI.
- Add smooth opening and closing animations.
## 2. GUI Design
Use the reference image as the main visual inspiration, but make the following changes.
### Header
- Replace the "LUNAR CLIENT" text with **"Counter32 Client"**.
- Keep a modern, clean font.
- Remove the SETTINGS and WAYPOINTS tabs.
- Keep only the **MODS** tab.
- Add a close button (X) in the top-right corner.
### Colors
Use this color palette:
- Main GUI background: dark navy blue (#101A35).
- Secondary panels: navy blue (#192747).
- Enabled mod: bright blue (#247BFF).
- Disabled mod: purple (#8134D9).
- Text: white (#FFFFFF).
- Borders: subtle blue (#354A79).
- Particle effects: glowing purple (#A855F7).
The GUI should look professional, with rounded corners, subtle borders, smooth hover effects, and animated transitions.
### Remove Unnecessary Elements
Remove all existing Lunar Client example mods, including ReplayMod, FPS, CPS, Toggle Sneak/Sprint, Zoom, and Armor Status.
Also remove:
- The entire left sidebar containing Testing, Main, Latest Version PvP, and Lower Version PvP.
- The profile selection system.
- The Save as New Profile button.
- The Settings and Waypoints tabs.
- The extra category filters such as New, HUD, Server, and Mechanic.
For now, the client should contain only **one mod: Hit Color**.
## 3. Mod Card System
Display the Hit Color mod in a rectangular card inspired by the reference image.
The card should contain:
- A simple sword icon.
- The mod name: **Hit Color**.
- An OPTIONS button.
- An ENABLED or DISABLED button.
### Enabled State
When Hit Color is enabled:
- The toggle button becomes bright blue.
- The button displays "ENABLED".
- The mod's functionality becomes active immediately.
### Disabled State
When Hit Color is disabled:
- The toggle button becomes purple.
- The button displays "DISABLED".
- The mod's functionality stops immediately.
### Purple Particle Animation
Whenever the player enables or disables a mod, play a smooth purple particle animation.
Animation requirements:
- Small glowing purple particles appear around the toggle button.
- The particles spread outward in different directions.
- They gradually fade away.
- The particles should last approximately 0.4–0.7 seconds.
- The button should smoothly transition between blue and purple.
- The animation should work in both directions.
- The particles must be rendered as GUI effects, not actual Minecraft world particles.
- The animation should not cause noticeable FPS drops.
## 4. Hit Color Mod
Implement a fully functional client-side mod called **Hit Color**.
When the player attacks another entity, the entity should briefly flash with the selected hit color instead of the normal Minecraft damage tint.
The color should be customizable through the mod's OPTIONS menu.
The effect should work on multiplayer servers without requiring the server to install Counter32 Client.
The mod must not modify actual damage, attack speed, knockback, or any server-side combat mechanics.
## 5. Hit Color Options Menu
Clicking the OPTIONS button on the Hit Color card should open a dedicated settings panel inside the Counter32 Client GUI.
The panel should contain exactly three settings.
### Setting 1: Hit Color
Label: **Hit Color**
Allow the player to choose the color displayed when hitting another entity.
Display a color preview showing the currently selected hit color.
The selected color should update immediately.
### Setting 2: Apply Hit Color to Armor
Label: **Apply Hit Color to Armor**
Add an ON/OFF toggle.
When enabled:
- The selected hit color affects the entity's visible armor as well as its body.
- The armor and body should flash with the same color.
When disabled:
- The hit color affects only the entity's body.
- The armor retains its normal appearance.
The toggle should use blue for ON and purple for OFF.
### Setting 3: Hit Color Slider
Label: **Hit Color Slider**
Add an interactive horizontal rainbow color slider.
- The slider should display a full spectrum of colors.
- Dragging the slider changes the selected hit color in real time.
- Show a small preview of the selected color next to the slider.
- The slider should support smooth transitions between colors.
- The selected color must be used by the Hit Color mod.
- The slider and the color preview in Setting 1 must always stay synchronized.
## 6. Saving Settings
All settings must be saved automatically, including:
- Whether Hit Color is enabled or disabled.
- The selected hit color.
- Whether the hit color affects armor.
Settings must persist after restarting Minecraft.
## 7. Technical Requirements
- Minecraft version: **1.21.4**
- Mod loader: **Fabric**
- Client name: **Counter32 Client**
- GUI keybind: **Right Shift**
- Client-side functionality only.
- Compatible with Minecraft multiplayer servers.
- Use the appropriate Fabric API and Minecraft 1.21.4 rendering methods.
- Ensure the hit color effect does not permanently modify entity textures.
- Use client-side rendering hooks or mixins where necessary.
- Avoid rendering conflicts with vanilla Minecraft.
- Keep the implementation modular so additional mods can be added later.
- Ensure all buttons, sliders, animations, and settings actually work.
## 8. Final Requirements
Create a functional Minecraft client mod, not just a visual GUI mockup.
The result must include:
1. A working Right Shift GUI.
2. The Counter32 Client branding.
3. A dark navy blue interface.
4. Blue enabled buttons and purple disabled buttons.
5. Purple particle animations when toggling mods.
6. One working Hit Color mod.
7. Three functional Hit Color settings.
8. A rainbow color slider.
9. Optional armor recoloring.
10. Automatic configuration saving.
The final result should visually resemble the provided Lunar Client reference image while using Counter32 Client branding, colors, and functionality.
**Important:** Do not add any other mods, categories, tabs, or unnecessary features yet. Only implement the features described above.
Set up the Fabric client mod and persistent Hit Color settings.
Build the animated Counter32 screen, toggle, options panel, and rainbow slider.
Hook attacks and entity rendering for a client-only hit tint, including optional armor tint.
Created the Counter32 Client Fabric mod with a Right Shift menu, animated Hit Color card and toggle, three-setting options panel with synchronized rainbow slider and armor toggle, and persistent settings in config/counter32-client.properties.
When enabled, attacks briefly recolor living entities on the client; optional armor tint is included. The callback passes through vanilla attacks, so it doesn’t change damage or other combat mechanics.
📄
pasted-code-1792949298512.txt
txt
474 lines
▶
# Counter32 Client – Complete Update
## Minecraft Java Edition 1.21.4 | Fabric
Update the existing Counter32 Client mod. Keep all previously implemented features and add the new features described below.
The client must be fully compatible with Minecraft Java Edition 1.21.4 using Fabric Loader.
# 1. Main GUI Changes
The Counter32 Client GUI must open when the player presses Right Shift.
Keep the existing visual design:
- Dark navy blue, semi-transparent background.
- White text and modern fonts.
- Bright blue buttons for enabled mods.
- Purple buttons for disabled mods.
- Purple glowing particle animations when enabling or disabling mods.
- Smooth GUI animations and rounded corners.
- "Counter32 Client" branding in the top-left corner.
## New Categories
At the top of the GUI, display three categories horizontally:
**MODS | VISUALS | HUD**
Each category must be clickable.
The currently selected category should be highlighted in bright blue.
### MODS
Display all installed Counter32 Client mods together.
### VISUALS
Display only visual modification mods:
- Hit Color
- No Fire
- Glint Color
### HUD
Display HUD-related mods:
- FPS
Do not add any other categories.
# 2. Resize Mod Cards
Change the size of the mod cards.
The GUI must display exactly **2 mod cards per row** instead of 3.
Requirements:
- Each mod card should occupy approximately half of the available content width.
- Leave a small gap between the cards.
- Automatically place additional mods in new rows.
- Make the cards slightly wider and visually balanced.
- Keep the mod icon, name, OPTIONS button, and ENABLED/DISABLED toggle.
- Make the layout responsive to different Minecraft window sizes.
- Add vertical scrolling when there are too many mods to fit on the screen.
The layout should look like this:
Row 1: [Hit Color] [No Fire]
Row 2: [Glint Color] [FPS]
This example represents the MODS category.
# 3. Hit Color Mod – Updated
Keep the existing Hit Color mod and improve it.
When a player attacks another entity, the entity should flash with the selected custom color.
## Hit Color Priority
Counter32 Client's Hit Color must take visual priority over other installed Hit Color mods whenever it is enabled.
Requirements:
- Display only Counter32 Client's selected hit color whenever possible.
- Prevent overlapping hit-color effects.
- Avoid color mixing and flickering.
- Prevent other compatible Hit Color implementations from overriding the selected color.
- When Counter32 Client's Hit Color is disabled, restore normal behavior for other mods.
- Do not delete, modify, or disable other installed mods.
- Use compatible rendering hooks and mixins to handle conflicts.
- Handle incompatible rendering mods gracefully rather than crashing.
## Hit Color Settings
Clicking OPTIONS must open the following settings:
### Setting 1 – Hit Color
Display the currently selected hit color with a live color preview.
### Setting 2 – Apply Hit Color to Armor
Add an ON/OFF toggle.
ON:
- Apply the selected hit color to the entity and its visible armor.
OFF:
- Apply the selected hit color only to the entity's body.
### Setting 3 – Rainbow Color Slider
Add a horizontal rainbow slider.
- Allow the player to select any color.
- Update the color preview in real time.
- Apply the selected color immediately.
### Setting 4 – HEX Color Code
Add an editable text field where the player can manually enter a HEX color.
Examples:
- #FF0000 – Red
- #0000FF – Blue
- #00FF00 – Green
- #8000FF – Purple
- #FFFFFF – White
- #000000 – Black
Requirements:
- Accept the #RRGGBB format.
- Support copying and pasting.
- Synchronize the HEX field with the rainbow slider.
- Update the preview immediately after entering a valid color.
- Reject invalid codes without crashing.
- Automatically save the selected color.
# 4. New Visual Mod – No Fire
Category: VISUALS
Mod name: **No Fire**
Create a client-side visual mod that controls the fire overlay.
## Main Function
When No Fire is enabled:
- Completely remove the first-person fire overlay when the player is burning.
- The player must not see any fire covering their screen.
- The screen must remain completely clear.
- Do not change actual fire damage or burning mechanics.
- The mod must work in singleplayer and multiplayer.
When No Fire is disabled:
- Restore the normal Minecraft fire overlay.
## No Fire Settings
Clicking OPTIONS opens a setting called:
**Small Ground Fire**
Add an ON/OFF toggle.
### ON
- Display a small fire animation near the bottom of the screen while the player is burning.
- The fire must be much smaller than the default Minecraft fire overlay.
- It must not obstruct the player's crosshair or central view.
- Keep the small fire animation close to the bottom edge of the screen.
### OFF
- Completely hide the fire overlay.
- No fire animation should appear on the screen while burning.
Important: This setting controls the optional small first-person fire overlay, not actual fire blocks placed in the Minecraft world.
The Small Ground Fire option should only affect rendering while No Fire is enabled.
# 5. New Visual Mod – Glint Color
Category: VISUALS
Mod name: **Glint Color**
Create a mod that allows players to customize the enchantment glint effect on enchanted items.
## Main Function
When enabled:
- Replace the default purple enchantment glint with a custom selected color.
- Apply the custom glint to enchanted items.
- Support items in the inventory, hotbar, and when held in the player's hands.
- Preserve the original enchantment glint animation.
- Keep the effect compatible with Minecraft 1.21.4 rendering.
When disabled:
- Restore Minecraft's default enchantment glint.
## Glint Color Settings
Clicking OPTIONS opens two sliders.
### Setting 1 – Glint Color Slider
Create a horizontal rainbow slider.
Requirements:
- Allow the player to choose any color.
- Display a live preview of the enchantment glint.
- Apply color changes immediately.
- Save the selected color automatically.
### Setting 2 – Glint Strength Slider
Create a second horizontal slider below the color slider.
Label: **Glint Strength**
Range: 0% to 100%
Behavior:
- 0%: Completely invisible enchantment glint.
- 25%: Very subtle enchantment glint.
- 50%: Medium enchantment glint.
- 75%: Strong enchantment glint.
- 100%: Maximum enchantment glint intensity.
The slider must control the visual intensity or opacity of the enchantment glint.
The glint animation should remain smooth at every strength level.
Changing glint strength must not modify item enchantments or gameplay mechanics.
# 6. New HUD Mod – FPS
Category: HUD
Mod name: **FPS**
Create a customizable FPS counter.
## Main Function
When enabled:
- Display the player's current FPS on the Minecraft screen.
- Update the FPS counter continuously.
- Use Minecraft's actual client FPS value.
- Keep the FPS counter lightweight and optimized.
Example display:
**FPS: 240**
When disabled:
- Completely hide the FPS counter.
## FPS Settings
Clicking OPTIONS opens the FPS configuration panel.
### Setting 1 – Text Color
Add a rainbow color slider.
Requirements:
- Allow the player to change the FPS text color.
- Show a live preview.
- Apply the selected color immediately.
- Save the color automatically.
### Setting 2 – EDIT Button
Below the color setting, add a button labeled:
**EDIT**
Clicking EDIT must open an interactive HUD editing mode.
# 7. FPS HUD Editor
When the player clicks EDIT:
- Close the normal mod settings panel.
- Display the Minecraft world with a HUD editing overlay.
- Keep the FPS counter visible.
- Allow the player to move and resize the FPS counter.
## Moving the FPS Counter
The player must be able to:
- Click and hold the FPS counter with the mouse.
- Drag it anywhere on the screen.
- Release the mouse to save its new position.
The FPS counter should follow the mouse smoothly.
## Resizing the FPS Counter
Allow the player to change the size of the FPS text.
Requirements:
- Display a visible resize handle when the FPS counter is selected.
- Dragging the handle changes the FPS counter size.
- Support small, medium, and large text sizes, including sizes between them.
- Maintain correct text proportions.
- Prevent the FPS counter from moving outside the visible screen.
## HUD Editor Controls
Add the following buttons:
**SAVE** – Save the current position and size.
**RESET** – Restore the default FPS position and size.
**CANCEL** – Exit editing without saving changes made during the current editing session.
## HUD Editor Appearance
- Add a subtle blue outline around the selected FPS counter.
- Display a small resize handle.
- Keep the editor background slightly darkened.
- The Minecraft world should remain visible.
- The FPS counter should remain fully readable.
## Saving HUD Settings
Automatically preserve the saved FPS configuration:
- Text color.
- Position.
- Size.
- Enabled or disabled state.
The saved configuration must remain after restarting Minecraft.
HUD positions should adapt correctly when changing screen resolution or GUI scale.
# 8. GUI Animations
Keep the purple particle animation for every mod toggle.
Whenever a mod is enabled or disabled:
- Spawn small glowing purple particles around the toggle button.
- Animate the particles outward.
- Fade them smoothly.
- Use a duration of approximately 0.4–0.7 seconds.
- Smoothly transition the button between blue and purple.
Also add subtle animations when:
- Switching between MODS, VISUALS, and HUD.
- Opening mod settings.
- Closing mod settings.
- Hovering over mod cards.
- Entering or leaving the FPS HUD editor.
Animations must not noticeably reduce Minecraft performance.
# 9. Configuration System
Create a persistent client-side configuration system.
Save the following settings:
### Hit Color
- Enabled state.
- Selected color.
- HEX color code.
- Apply Hit Color to Armor state.
### No Fire
- Enabled state.
- Small Ground Fire ON/OFF state.
### Glint Color
- Enabled state.
- Selected glint color.
- Glint strength percentage.
### FPS
- Enabled state.
- FPS text color.
- HUD position.
- HUD size.
Save settings in a Counter32 Client configuration file.
Load the saved settings automatically when Minecraft starts.
# 10. Technical Requirements
Target environment:
- Minecraft Java Edition 1.21.4
- Fabric Loader
- Compatible Fabric API
- Java 21
- Client-side mod
Implementation requirements:
- Use Minecraft 1.21.4-compatible rendering methods.
- Use appropriate Fabric API events and mixins where necessary.
- Implement actual working mod functionality, not visual placeholders.
- Ensure that the GUI scales correctly at different resolutions.
- Prevent crashes caused by invalid HEX codes or slider values.
- Avoid conflicts with Minecraft's normal gameplay mechanics.
- Ensure the client works on multiplayer servers without requiring a server-side installation.
- Keep the code modular so additional mods can be added later.
- Avoid unnecessary rendering overhead.
- Use appropriate error handling and configuration validation.
# 11. Final Mod Structure
The finished Counter32 Client must contain:
**MODS**
- Hit Color
- No Fire
- Glint Color
- FPS
**VISUALS**
- Hit Color
- No Fire
- Glint Color
**HUD**
- FPS
Each mod must have its own card with an OPTIONS button and an ENABLED/DISABLED toggle.
The MODS category displays every mod, while VISUALS and HUD display their respective mods.
All categories must use the same two-column card layout.
# 12. Important Final Instructions
Do not remove any previously implemented Counter32 Client features unless explicitly requested.
Do not add unrelated mods.
Do not add the old Lunar Client sidebar or profile system.
Do not add SETTINGS or WAYPOINTS tabs.
Keep the client branding as **Counter32 Client**.
The final implementation must be a functional Fabric mod for Minecraft 1.21.4.
All GUI buttons, sliders, mod effects, animations, configuration options, and the FPS HUD editor must work correctly.
Inspect the existing mod and map its screen, config, mixins, and rendering hooks.
Add the three categories and four mod cards, including No Fire, Glint Color, and FPS features.
Extend persistent settings and implement the HEX input and draggable/resizable FPS editor.
Verify every new Minecraft/Fabric API hook against the 1.21.4 source before patching.
Implemented the Counter32 Client update with MODS, VISUALS, and HUD categories, responsive two-column scrolling cards, and persistent settings.
Added No Fire with an optional reduced first-person fire overlay, Glint Color with color and strength sliders, and FPS with a color slider and draggable/resizable HUD editor.
Expanded Hit Color options with armor tinting and an editable, pasteable
#RRGGBBfield synchronized with the rainbow slider.Kept the existing Right Shift menu, animations, particles, and client-only behavior. No combat mechanics or other mods are changed.
Hit Color precedence is best-effort through a high-priority rendering mixin; incompatible third-party rendering hooks cannot be guaranteed not to conflict.
Counter32 Client – Hit Color Fix + Armor HUD
Minecraft Java Edition 1.21.4 | Fabric
Update the existing Counter32 Client. Keep all previously implemented features and add the changes described below.
1. Fix Hit Color Damage Detection
Currently, Hit Color activates only when the local player attacks an entity. This must be fixed.
Hit Color must activate whenever any visible living entity receives damage, regardless of the source.
Examples include:
- Player attacking another player.
- Another player attacking an entity.
- Mobs attacking players or other mobs.
- Fall damage.
- Fire and lava damage.
- Explosion damage.
- Projectile damage.
- Other damage sources.
Damage Detection
Use Minecraft's built-in entity damage animation system instead of local player attack events.
- Use the entity's
hurtTimeor equivalent Minecraft 1.21.4 damage animation state. - Apply the custom Hit Color while the entity's damage animation is active.
- Stop applying the color when the animation ends.
- Do not trigger the effect when an attack misses or an entity does not enter its damage animation.
- Support damage animations synchronized from multiplayer servers.
- Keep the effect active for the normal Minecraft damage flash duration.
Rendering
- Replace the default red damage flash with the selected custom color.
- Restore the normal entity appearance when the damage animation ends.
- Respect the existing Apply Hit Color to Armor setting.
- Do not permanently modify entity textures.
- Avoid overlapping effects from other Hit Color mods whenever technically possible.
- When Counter32 Client's Hit Color is disabled, restore normal Minecraft rendering or compatible third-party mod behavior.
Preserve Existing Settings
Keep:
- Rainbow color slider.
- HEX color input such as
#FF0000. - Live color preview.
- Apply Hit Color to Armor ON/OFF.
- Enabled/Disabled toggle.
- Automatic settings saving.
Important: Hit Color must be based on the entity's damage animation, not on the local player's attack action. It must also work when the local player receives damage.
2. Add a New HUD Mod – Armor HUD
Add a new mod called Armor HUD to the HUD category.
The HUD category must now contain:
- FPS
- Armor HUD
The MODS category must also display Armor HUD alongside all other installed Counter32 Client mods.
Armor HUD must have its own mod card, OPTIONS button, and ENABLED/DISABLED toggle.
When enabled, Armor HUD displays the player's equipped armor and its durability on the Minecraft screen.
When disabled, the entire Armor HUD disappears.
3. Armor HUD – Two Display Styles
Inside Armor HUD OPTIONS, add two selectable display modes:
Style 1 and Style 2.
Only one style can be active at a time.
Use the two provided screenshots as the visual references.
Style 1 – Separate Armor Elements
This style must look like the FIRST reference screenshot.
Display the player's equipment as separate HUD elements.
Include:
- Helmet icon and durability.
- Chestplate icon and durability.
- Leggings icon and durability.
- Boots icon and durability.
- Held item icon and durability information, where applicable.
For armor, show the remaining durability as a percentage, such as 100%.
Use a green percentage indicator when durability is high.
The displayed percentage must update automatically when equipment loses durability.
The equipment icons should use actual Minecraft item textures.
Style 1 – EDIT Button
Below the Style 1 selection, add an EDIT button.
Clicking EDIT opens the HUD editor.
The player must be able to move each equipment element independently.
For example:
- Move the helmet icon and its durability to the top-left corner.
- Move the chestplate icon and its durability to the bottom-left corner.
- Move the leggings icon and its durability to the right side.
- Move the boots icon and its durability anywhere else.
- Move the held item display independently.
Each icon and its associated durability text should be treated as one draggable HUD element.
Allow players to drag each element using the mouse.
Add:
- SAVE button.
- CANCEL button.
- RESET button.
SAVE stores the positions.
CANCEL discards changes from the current editing session.
RESET restores the default layout.
All saved positions must persist after restarting Minecraft.
4. Style 2 – Compact Armor HUD
This style must look like the SECOND reference screenshot.
Display all four armor pieces together in a compact horizontal HUD.
The armor icons must appear in this order:
- Helmet
- Chestplate
- Leggings
- Boots
Use the player's actual equipped armor textures.
The HUD should have a subtle, dark, semi-transparent background behind the icons, matching the reference image.
Keep the icons compact and evenly spaced.
Style 2 – Left or Right Position
Inside the Style 2 settings, add a setting called:
HUD Side
Options:
- LEFT
- RIGHT
LEFT places the compact armor HUD on the left side of the screen.
RIGHT places it on the right side of the screen.
Switching sides should update the position immediately.
Fix Hit Color to follow synchronized entity damage animations while preserving its existing settings and rendering behavior.
Add Armor HUD with both display styles, editable persistent positions, and its HUD/MODS cards and controls.
Add persistent Armor HUD settings for enablement, style, side, and five independently positioned elements.
Register the HUD renderer and wire Armor HUD into the existing HUD/MODS cards and options.
Add Style 1’s drag editor with SAVE/CANCEL/RESET and Style 2’s left/right placement.
Hit Color: Now follows each living entity’s vanilla
hurtTimeduring rendering, so damage from any source—including damage to the local player—triggers the selected color. The local-attack trigger was removed; the existing color controls and armor setting remain.Armor HUD: Added to both the HUD and MODS categories with its own enable toggle and options.
Style 1: Shows equipped item textures and durability percentages, with an editor to drag elements independently. SAVE, CANCEL, and RESET are included; saved positions persist in the existing settings file.
Style 2: Shows armor compactly with durability indicators and a HUD Side option for immediate LEFT/RIGHT placement.
📄
pasted-code-1793030657239.txt
txt
1101 lines
▶
# COUNTER32 CLIENT
## Complete Minecraft Client Mod Specification
### Minecraft Java Edition 1.21.4 | Fabric | Java 21
# 1. Project Overview
Create a fully functional, client-side Minecraft modification called **Counter32 Client**.
Counter32 Client is a customizable Minecraft PvP and visual enhancement client inspired by the graphical design of Lunar Client.
The project must be developed specifically for Minecraft Java Edition 1.21.4 using Fabric Loader and Java 21.
The client must include a custom graphical interface, configurable visual modifications, customizable HUD elements, persistent settings, and smooth animations.
This is a real, functional Minecraft mod, not a visual demonstration or mockup.
The client must work in singleplayer and on multiplayer servers without requiring server-side installation.
## Core Features
The initial release must contain exactly five mods:
1. Hit Color
2. No Fire
3. Glint Color
4. FPS
5. Armor HUD
Do not add additional gameplay modules or unrelated features.
All five modules must be independently configurable and toggleable.
# 2. Main GUI and Keybind
## Opening the Interface
The main Counter32 Client GUI must open when the player presses **Right Shift**.
Requirements:
- Right Shift opens the GUI while playing Minecraft.
- Right Shift closes the GUI when it is already open, provided no text field is actively capturing input.
- ESC closes the GUI or returns to the previous settings screen.
- The GUI must be usable with the mouse.
- Opening the GUI must not disconnect the player from a multiplayer server.
- Minecraft gameplay should be paused only where appropriate in singleplayer.
- The GUI should scale correctly across different screen resolutions and GUI scale settings.
## Main Window Design
The GUI must be inspired by the provided Lunar Client reference screenshot.
However, it must use original Counter32 Client branding and its own color scheme.
The main interface must have:
- A large centered rectangular panel.
- A dark navy blue semi-transparent background.
- Slightly rounded corners.
- Thin blue borders.
- Smooth opening and closing animations.
- White text.
- Subtle blue highlights.
- Clean spacing.
- A modern, professional Minecraft client appearance.
The Minecraft world must remain visible behind the interface.
The interface must not be fully opaque.
## Branding
At the top-left corner, display:
**Counter32 Client**
Use white text with a clean, bold font.
Do not display the Lunar Client name or logo.
A small original Counter32 Client icon may be placed next to the name.
At the top-right corner, include an X button that closes the interface.
# 3. GUI Color Palette
Use the following primary colors:
| Element | Color |
|---|---|
| Main background | #101A35 |
| Secondary background | #192747 |
| Panel borders | #354A79 |
| Enabled button | #247BFF |
| Disabled button | #8134D9 |
| Selected category | #247BFF |
| Purple particles | #A855F7 |
| Primary text | #FFFFFF |
| Secondary text | #AAB6D3 |
Enabled modules must always use blue buttons.
Disabled modules must always use purple buttons.
Do not use green or red as the main toggle colors.
Add smooth transitions between enabled and disabled states.
# 4. Navigation Categories
At the top of the GUI, next to the Counter32 Client branding, display three clickable categories:
**MODS | VISUALS | HUD**
Only these three categories should exist.
Do not add Settings, Waypoints, Testing, Main, PvP profiles, or any other tabs.
## MODS Category
The MODS category displays every available Counter32 Client module:
- Hit Color
- No Fire
- Glint Color
- FPS
- Armor HUD
## VISUALS Category
The VISUALS category contains:
- Hit Color
- No Fire
- Glint Color
## HUD Category
The HUD category contains:
- FPS
- Armor HUD
## Category Behavior
When a category is selected:
- Highlight the selected category in bright blue.
- Display only the relevant modules.
- Use a smooth transition when changing categories.
- Keep the main GUI dimensions consistent.
- Preserve the enabled or disabled state of every module.
Switching categories must not reset module settings.
# 5. Module Card Layout
Display exactly two module cards per row.
Each card must occupy approximately half of the available content width, allowing for spacing between cards.
For example, the MODS category should display:
Row 1:
Hit Color | No Fire
Row 2:
Glint Color | FPS
Row 3:
Armor HUD | Empty space
Each card must contain:
- A recognizable module icon.
- The module name.
- An OPTIONS button.
- An ENABLED/DISABLED button.
## Module Card Appearance
- Dark navy blue background.
- Thin blue border.
- Rounded corners.
- White module name.
- Centered icon.
- Bottom action buttons.
- Smooth hover animation.
The cards must have consistent dimensions.
If the module list exceeds the available space, enable vertical scrolling.
## Toggle Buttons
When enabled:
- Button color: #247BFF.
- Text: ENABLED.
- Module functionality activates immediately.
When disabled:
- Button color: #8134D9.
- Text: DISABLED.
- Module functionality stops immediately.
# 6. Purple Particle Toggle Animation
Whenever a module is enabled or disabled, play a purple particle animation.
The particles must be rendered inside the GUI, not inside the Minecraft world.
## Particle Behavior
- Spawn approximately 12–25 small glowing particles around the toggle button.
- Use purple shades based on #A855F7.
- Move particles outward in randomized directions.
- Gradually reduce their opacity.
- Make particles disappear after approximately 0.4–0.7 seconds.
- Use smooth easing.
- Add a subtle glow effect.
- Animate the button color simultaneously.
The effect must work when enabling and disabling every module.
Particle effects must not noticeably reduce FPS.
# 7. HIT COLOR MODULE
Category: VISUALS
Module name: **Hit Color**
Icon: Sword or combat-related symbol.
## Purpose
Hit Color replaces Minecraft's normal red entity damage flash with a user-selected custom color.
The effect must be triggered by an entity's damage animation, not by the local player's attack action.
## Damage Detection
Hit Color must activate whenever a visible living entity enters its damage animation state.
Examples:
- A player hits another player.
- Another player hits a player.
- A zombie damages a player.
- A skeleton shoots an entity.
- An entity receives fall damage.
- An entity receives explosion damage.
- An entity receives fire or lava damage.
- An entity receives projectile damage.
- A mob damages another mob.
- The local player receives damage.
Use Minecraft's synchronized entity damage animation state, such as `hurtTime`, or the appropriate equivalent in Minecraft 1.21.4.
Do not rely only on attack events generated by the local player.
## Important Activation Rules
- The custom color must appear while the entity is in its damage animation state.
- The custom color must disappear when the damage animation ends.
- Do not activate Hit Color when a player swings a weapon without hitting anything.
- Do not activate Hit Color for attacks that do not produce a damage animation.
- Do not permanently recolor entity textures.
- Restore normal rendering immediately after the damage animation ends.
The implementation must respect the limitations of client-visible damage state. If the server does not send a damage animation, the client should not invent one.
## Hit Color Rendering
The selected color should replace the vanilla red damage tint.
The color must be applied during the normal damage flash.
Use compatible entity rendering methods for Minecraft 1.21.4.
Avoid changing entity textures permanently.
Support visible players and living mobs.
## Hit Color Priority
When Counter32 Client's Hit Color is enabled, its color should take priority over compatible third-party Hit Color mods.
Requirements:
- Prevent double color overlays where possible.
- Avoid flickering.
- Avoid overlapping damage tint effects.
- Ensure Counter32 Client's selected color is displayed consistently.
- Do not modify or delete other installed mods.
- Restore normal or third-party rendering behavior when Counter32 Client's Hit Color is disabled.
Universal compatibility with every rendering mod cannot be guaranteed, so incompatible implementations must be handled safely.
# 8. HIT COLOR SETTINGS
Clicking OPTIONS opens the Hit Color settings panel.
## Setting 1: Hit Color Preview
Display a live preview of the currently selected color.
The preview should update immediately whenever the player changes the color.
## Setting 2: Apply Hit Color to Armor
Add an ON/OFF toggle.
When ON:
- Apply the custom damage color to the entity's body.
- Apply the same damage color to the entity's equipped armor where supported.
When OFF:
- Apply the custom damage color only to the entity's body.
- Keep armor rendering unchanged.
## Setting 3: Rainbow Color Slider
Add a horizontal rainbow slider.
The slider must:
- Display a continuous rainbow gradient.
- Allow precise color selection.
- Update the preview immediately.
- Apply the selected color without requiring a restart.
- Save the selected color automatically.
## Setting 4: HEX Color Input
Add an editable text field labeled:
**HEX Color Code**
Support standard six-digit hexadecimal colors in the format #RRGGBB.
Examples:
- #FF0000: Red
- #00FF00: Green
- #0000FF: Blue
- #8000FF: Purple
- #FFFFFF: White
- #000000: Black
Requirements:
- Allow keyboard input.
- Support copy and paste.
- Validate the HEX code.
- Do not crash when invalid text is entered.
- Apply valid colors immediately.
- Synchronize the HEX field with the rainbow slider.
- Update the preview.
- Save the selected HEX value.
The HEX input and rainbow slider must control the same color value.
# 9. NO FIRE MODULE
Category: VISUALS
Module name: **No Fire**
Icon: Flame symbol.
## Purpose
No Fire removes the obstructive first-person fire overlay that appears when the player is burning.
## Main Behavior
When enabled:
- Completely hide the default first-person fire overlay.
- Keep the center of the screen clear.
- Preserve normal Minecraft burning mechanics.
- Do not change fire damage.
- Do not remove actual fire blocks.
- Do not affect server-side gameplay.
When disabled:
- Restore Minecraft's normal first-person fire overlay.
## No Fire Settings
Clicking OPTIONS opens the No Fire settings.
Add one setting:
**Small Ground Fire**
Use an ON/OFF toggle.
### ON
While the player is burning:
- Display a much smaller first-person fire animation.
- Position the animation near the bottom edge of the screen.
- Keep the crosshair and central view unobstructed.
- Use Minecraft's fire texture where appropriate.
- Keep the animation smooth.
### OFF
- Hide the first-person fire overlay completely.
- No fire should cover the player's screen.
The Small Ground Fire setting must not modify fire blocks in the world.
# 10. GLINT COLOR MODULE
Category: VISUALS
Module name: **Glint Color**
Icon: Enchanted item or sparkle symbol.
## Purpose
Glint Color customizes the color and intensity of Minecraft's enchantment glint.
## Main Behavior
When enabled:
- Replace the default enchantment glint color with the selected custom color.
- Preserve the normal moving enchantment glint animation.
- Apply the effect to enchanted items.
- Support inventory rendering.
- Support hotbar rendering.
- Support items held in first person.
- Support compatible enchanted equipment rendering.
When disabled:
- Restore Minecraft's normal enchantment glint.
Do not change actual enchantments or item properties.
# 11. GLINT COLOR SETTINGS
Clicking OPTIONS opens two sliders.
## Setting 1: Glint Color
Add a horizontal rainbow color slider.
Requirements:
- Allow the player to choose any color.
- Show a live preview using an enchanted item.
- Update the glint color immediately.
- Save the selected color automatically.
## Setting 2: Glint Strength
Add a second horizontal slider below the color slider.
Label:
**Glint Strength**
Range: 0%–100%
Behavior:
- 0%: Invisible enchantment glint.
- 25%: Very subtle glint.
- 50%: Medium glint.
- 75%: Strong glint.
- 100%: Maximum glint intensity.
Use opacity or another suitable rendering parameter to control the effect.
Keep the glint animation smooth at every intensity.
Changing strength must not affect item enchantments.
# 12. FPS MODULE
Category: HUD
Module name: **FPS**
Icon: Performance meter.
## Purpose
Display the player's current frames per second on the Minecraft screen.
## Main Behavior
When enabled:
- Display the current FPS value.
- Update the displayed value continuously.
- Use the real Minecraft client FPS measurement.
- Keep the counter lightweight.
Example:
FPS: 240
When disabled:
- Completely hide the FPS display.
# 13. FPS SETTINGS
Clicking OPTIONS opens the FPS settings.
## Setting 1: Text Color
Add a rainbow color slider.
Requirements:
- Allow the player to choose the FPS text color.
- Show a live preview.
- Apply changes immediately.
- Save the selected color.
## Setting 2: EDIT Button
Add a button labeled:
**EDIT**
Clicking EDIT opens the HUD editing interface.
# 14. FPS HUD EDITOR
The FPS HUD editor must allow the player to change the position and size of the FPS counter.
## Moving the Counter
- Click and hold the FPS display.
- Drag it anywhere on the screen.
- Release the mouse to position it.
- Keep movement smooth.
## Resizing the Counter
- Display a resize handle when the FPS element is selected.
- Allow dragging the handle to change text size.
- Preserve text proportions.
- Support a useful range of sizes.
## Editor Controls
Add three buttons:
**SAVE**
Save the position and size.
**CANCEL**
Discard unsaved changes made during the current editing session.
**RESET**
Restore the default position and size.
Keep the Minecraft world visible behind the editor.
Use a subtle blue outline around the selected HUD element.
Prevent the FPS counter from being positioned completely outside the visible screen.
# 15. ARMOR HUD MODULE
Category: HUD
Module name: **Armor HUD**
Icon: Chestplate or shield.
## Purpose
Display the player's equipped armor and equipment durability directly on the screen.
The Armor HUD module must support two selectable visual styles based on the two provided reference screenshots.
The player must be able to switch between the styles from the OPTIONS menu.
Only one style should be displayed at a time.
When Armor HUD is disabled, all its HUD elements must disappear.
# 16. ARMOR HUD STYLE 1
Name: **Style 1 – Separate Elements**
Use the FIRST reference screenshot as the visual design reference.
This style displays individual armor and equipment elements that can be positioned separately.
## Displayed Equipment
Include:
- Helmet
- Chestplate
- Leggings
- Boots
- Held item durability display
Each equipment element should display the actual Minecraft item icon.
For damageable equipment, display the remaining durability as a percentage.
Examples:
Helmet: 100%
Chestplate: 85%
Leggings: 72%
Boots: 43%
Use the real item texture, not a generic armor icon.
Durability values must update automatically.
## Default Appearance
Use green durability text for high remaining durability.
The item icon should appear directly next to its durability percentage.
Keep the display compact.
Match the visual arrangement of the first reference screenshot as closely as possible.
## Style 1 Editing
Inside the Style 1 settings, add an EDIT button.
Clicking EDIT opens the HUD editor.
Allow the player to move each equipment element independently.
Each icon and its durability text must be grouped as one draggable element.
For example:
- Helmet can be positioned in the upper-left corner.
- Chestplate can be placed elsewhere.
- Leggings can be positioned on the right.
- Boots can be positioned independently.
- Held item display can be positioned separately.
The player must be able to drag these elements with the mouse.
Changes must be previewed immediately.
## Editor Buttons
SAVE:
Store the new positions.
CANCEL:
Discard unsaved changes.
RESET:
Restore the default Style 1 layout.
All saved positions must persist after restarting Minecraft.
# 17. ARMOR HUD STYLE 2
Name: **Style 2 – Compact Armor Bar**
Use the SECOND reference screenshot as the visual design reference.
This style displays the player's four armor pieces in one compact horizontal bar.
## Layout
Display armor in the following order:
Helmet | Chestplate | Leggings | Boots
Use the player's actual equipped armor textures.
Place the icons inside a dark semi-transparent rectangular background.
Use thin borders and small gaps between icons.
The entire bar should be compact and visually similar to the reference screenshot.
## Style 2 Settings
Add a setting called:
**HUD Side**
Options:
LEFT | RIGHT
When LEFT is selected:
- Position the compact armor bar on the left side of the screen.
When RIGHT is selected:
- Position the compact armor bar on the right side of the screen.
The side change should apply immediately.
## Style 2 EDIT Button
Add an EDIT button below the side selection.
Clicking EDIT opens the HUD editor.
The player must be able to:
- Drag the entire compact armor bar.
- Move all four icons together.
- Preview the new position.
- Save the position.
The four armor icons must remain grouped.
Do not allow individual armor pieces to separate in Style 2.
## Style 2 Editor Buttons
SAVE:
Save the current position.
CANCEL:
Discard unsaved changes.
RESET:
Restore the default position for the selected side.
Store separate custom positions for LEFT and RIGHT.
# 18. ARMOR DURABILITY CALCULATION
Armor HUD must display accurate information from the player's current equipment.
Use the actual item durability values.
Calculate remaining durability as:
Remaining Percentage = ((Maximum Durability - Current Damage) / Maximum Durability) × 100
Requirements:
- Clamp the percentage between 0 and 100.
- Update when durability changes.
- Update when armor is equipped or removed.
- Support vanilla armor.
- Support compatible modded armor.
- Do not show invalid durability percentages for non-damageable items.
- Do not create fake equipment during gameplay.
If an armor slot is empty, use an empty placeholder only where the selected style requires it.
# 19. UNIVERSAL HUD EDITING SYSTEM
Create a reusable HUD editing system for FPS and Armor HUD.
The editor must:
- Render the Minecraft world behind the editing interface.
- Display selectable HUD elements.
- Allow mouse dragging.
- Support element resizing where applicable.
- Use blue selection outlines.
- Provide accurate positioning.
- Handle different screen resolutions.
- Handle Minecraft GUI scaling.
- Save settings correctly.
## Editing Rules
FPS:
- One draggable element.
- Resizable text.
Armor HUD Style 1:
- Multiple independently draggable elements.
- Each armor icon remains attached to its durability text.
Armor HUD Style 2:
- One draggable group.
- All armor icons move together.
The editor must correctly distinguish between these three behaviors.
# 20. CONFIGURATION SYSTEM
Create a persistent configuration system for Counter32 Client.
Save settings in the Minecraft configuration directory.
Suggested configuration path:
`config/counter32client.json`
## Hit Color Configuration
Save:
- Enabled state.
- Selected color.
- HEX color value.
- Apply Hit Color to Armor setting.
## No Fire Configuration
Save:
- Enabled state.
- Small Ground Fire setting.
## Glint Color Configuration
Save:
- Enabled state.
- Selected glint color.
- Glint strength.
## FPS Configuration
Save:
- Enabled state.
- Text color.
- Screen position.
- Text size.
## Armor HUD Configuration
Save:
- Enabled state.
- Selected style.
- Style 1 individual element positions.
- Style 2 selected side.
- Style 2 left-side custom position.
- Style 2 right-side custom position.
## Configuration Behavior
- Load settings when Minecraft starts.
- Save changes after modifying settings.
- Preserve settings after restarting Minecraft.
- Validate configuration values.
- Handle missing configuration files by creating defaults.
- Recover safely from invalid settings without crashing.
# 21. PERFORMANCE AND COMPATIBILITY
Counter32 Client must be optimized for normal Minecraft gameplay.
Requirements:
- Avoid unnecessary per-frame allocations.
- Do not perform expensive calculations repeatedly when cached values can be reused.
- Keep particle effects lightweight.
- Use appropriate client-side rendering hooks.
- Avoid unnecessary texture loading.
- Keep HUD rendering efficient.
- Do not modify server-side gameplay.
- Avoid conflicts with Fabric API and vanilla rendering.
The mod should work alongside common Fabric optimization mods whenever their rendering modifications are compatible.
Do not claim universal compatibility with every third-party mod.
# 22. PROJECT ARCHITECTURE
Use a clean, modular Java project structure.
Suggested components:
**Counter32Client**
- Main client initialization.
- Keybind registration.
- Configuration loading.
- Module initialization.
**ModuleManager**
- Register modules.
- Store enabled states.
- Manage module categories.
- Handle enabling and disabling.
**GuiManager**
- Main GUI.
- Category navigation.
- Module cards.
- Settings panels.
- Animations.
**HitColorModule**
- Damage animation detection.
- Custom damage tint rendering.
- Armor tint handling.
- Color settings.
**NoFireModule**
- First-person fire overlay control.
- Small fire rendering.
**GlintColorModule**
- Custom enchantment glint color.
- Glint intensity control.
**FpsModule**
- FPS measurement display.
- Color configuration.
- Position and size.
**ArmorHudModule**
- Equipment information.
- Durability calculation.
- Style selection.
- Style 1 rendering.
- Style 2 rendering.
**HudEditor**
- Mouse dragging.
- Element selection.
- Resize handling.
- Save, cancel, and reset.
**ConfigManager**
- JSON serialization.
- Default values.
- Configuration validation.
- Automatic saving.
**ParticleManager**
- GUI particle spawning.
- Particle animation.
- Particle rendering.
These are suggested logical components. Use an appropriate Java package structure and the actual Fabric and Minecraft 1.21.4 APIs.
# 23. REQUIRED PROJECT FILES
Generate a complete Fabric mod project with:
- `build.gradle`
- `settings.gradle`
- `gradle.properties`
- `fabric.mod.json`
- Required Java source files.
- Required mixin configuration.
- Required resource files.
- Client initialization entry point.
- Mod configuration system.
Use compatible dependency versions for Minecraft 1.21.4.
Use Java 21.
Do not mix APIs from different Minecraft versions.
Use the correct mapping names consistently throughout the project.
# 24. COMPILATION REQUIREMENTS
The project must compile for Minecraft 1.21.4 using Fabric.
Requirements:
- No missing imports.
- No unresolved classes.
- No nonexistent Minecraft methods.
- No incompatible mixin targets.
- No unsupported rendering calls.
- No missing resource references.
- No dependency version conflicts.
Use the Gradle build process.
Verify that the project can produce a valid Fabric mod JAR.
If compilation errors occur, fix the actual source of the errors rather than removing requested functionality.
Do not claim successful compilation unless the build has actually completed successfully.
# 25. FUNCTIONAL TESTING
Verify the following behaviors.
## GUI
- Right Shift opens the interface.
- Right Shift or ESC closes it appropriately.
- All three categories work.
- Exactly two module cards appear per row.
- Module toggle buttons work.
- Purple particle animations play.
- Module settings panels open correctly.
## Hit Color
- Works when the local player damages an entity.
- Works when another player damages an entity.
- Works when mobs damage entities.
- Works when the local player receives damage.
- Works with environmental damage animations.
- Does not activate from missed attacks.
- HEX input works.
- Rainbow slider works.
- Armor coloring toggle works.
## No Fire
- Default fire overlay disappears when enabled.
- Small Ground Fire ON displays a small overlay.
- Small Ground Fire OFF removes the overlay completely.
- Disabling the module restores vanilla behavior.
## Glint Color
- Selected color appears on enchanted items.
- Rainbow slider changes the color.
- Strength slider changes glint intensity.
- Disabling the module restores normal glint.
## FPS
- Displays actual FPS.
- Text color can be changed.
- HUD can be dragged.
- HUD can be resized.
- Position and size are saved.
## Armor HUD
- Both styles work.
- Style 1 displays separate equipment elements.
- Style 1 elements can be moved independently.
- Style 2 displays a compact horizontal armor bar.
- Style 2 supports LEFT and RIGHT positioning.
- Style 2 bar can be moved as one group.
- Equipment icons update automatically.
- Durability values are accurate.
- Settings persist after restarting Minecraft.
# 26. FINAL REQUIREMENTS
The completed Counter32 Client must have exactly these categories and modules:
**MODS**
1. Hit Color
2. No Fire
3. Glint Color
4. FPS
5. Armor HUD
**VISUALS**
1. Hit Color
2. No Fire
3. Glint Color
**HUD**
1. FPS
2. Armor HUD
All modules must be fully functional.
Keep the original Counter32 Client navy blue design.
Keep blue enabled buttons and purple disabled buttons.
Keep the purple GUI particle animations.
Keep the two-column module card layout.
Keep Right Shift as the GUI keybind.
Keep automatic configuration saving.
Implement both Armor HUD styles according to the provided screenshots.
The client must target Minecraft Java Edition 1.21.4 using Fabric and Java 21.
**Do not create placeholder functionality. Do not replace working modules with empty classes. Do not remove requested features to make the project compile. Implement the complete client with functional rendering, GUI controls, HUD editing, and persistent configuration.**
Audit the existing client, its GUI/modules/config, and identify what is missing from the supplied full specification.
Implement the missing features against the existing structure, checking every Minecraft/Fabric API signature against the 1.21.4 source before editing.
Review the touched files and report what is implemented and any verification limits.
Implemented the requested Counter32 Client updates.
Hit Color now follows each living entity’s vanilla
hurtTime, so the custom flash applies only during an actual damage animation, regardless of who or what caused the damage. Disabled Hit Color leaves vanilla or compatible third-party rendering untouched.Added Armor HUD as the fifth module, listed in MODS and HUD. Style 1 displays separate armor and held-item elements with durability percentages; Style 2 displays a compact armor bar with independent LEFT/RIGHT positions. Both styles have drag editors with SAVE, CANCEL, and RESET, and saved positions persist.
Preserved the existing No Fire, Glint Color, and FPS features. Added an enchanted-book preview for Glint Color and corrected FPS editor changes to save only when requested.
Armor HUD settings use the project’s existing persistent configuration system.
I did not run a local Gradle build or claim compilation success.
📄
pasted-code-1793112156544.txt
txt
504 lines
▶
# Counter32 Client – Armor HUD + Hit Color Fix
## Complete Implementation Specification
### Minecraft Java Edition 1.21.4 | Fabric | Java 21
Update the existing Counter32 Client with two changes:
1. Add a fully functional Armor HUD module with two different display styles.
2. Fix the existing Hit Color module so it activates whenever an entity receives damage, rather than only when the local player attacks.
Do not recreate Counter32 Client from scratch.
Do not remove or modify unrelated modules.
Keep the existing GUI design, categories, animations, keybinds, and configuration system.
---
# PART 1 – ARMOR HUD MODULE
## 1. Add Armor HUD to Counter32 Client
Create a new module called **Armor HUD**.
Add it to the existing HUD category and the main MODS category.
The HUD category must contain:
- FPS
- Armor HUD
The MODS category must contain:
- Hit Color
- No Fire
- Glint Color
- FPS
- Armor HUD
Armor HUD must have:
- An OPTIONS button.
- An ENABLED/DISABLED toggle.
- Two selectable display styles.
- A fully functional HUD editor.
- Automatic configuration saving.
Only one Armor HUD style can be active at a time.
# 2. STYLE 1 – SEPARATED ARMOR HUD
## 2.1 General Appearance
Style 1 must look like a traditional Minecraft PvP armor durability HUD.
It consists of two separate vertical columns of equipment icons and durability values.
One column is positioned on the left side of the screen, and the other on the right side.
Both columns appear in the lower portion of the screen.
There must be no shared background panel.
Do not add rectangles, colored boxes, borders, or slot backgrounds behind the equipment.
All icons and durability numbers must appear directly over the Minecraft world.
The design must be clean, pixelated, minimalistic, and easy to read.
## 2.2 Left Column
The left column contains exactly three rows.
### Row 1 – Helmet
- Display the player's equipped helmet icon on the left.
- Display the remaining helmet durability percentage immediately to its right.
- Example: `100%`.
- Use bright green text when durability is high.
- Add a dark outline or shadow around the text.
### Row 2 – Chestplate
- Display the player's equipped chestplate icon.
- Display the remaining chestplate durability percentage immediately to its right.
- Use the same font, size, and spacing as the helmet row.
### Row 3 – Main Hand Item
- Display the item currently held in the player's main hand.
- Display its remaining durability as a number if the item is damageable.
- For example, display `245` if the item has 245 durability points remaining.
- For stackable items without durability, display the stack count.
- Use white text with a dark outline.
### Left Column Alignment
- All three icons must align vertically.
- All durability numbers must begin at the same horizontal position.
- Icons must be approximately 16 × 16 Minecraft GUI pixels.
- The horizontal gap between icon and text should be approximately 3–5 GUI pixels.
- The vertical distance between consecutive row centers should be approximately 24 GUI pixels.
## 2.3 Right Column
The right column must be a horizontally mirrored version of the left column.
The durability values appear on the left, while equipment icons appear on the right.
### Row 1 – Leggings
- Display the remaining leggings durability percentage on the left.
- Display the equipped leggings icon immediately to the right.
### Row 2 – Boots
- Display the remaining boots durability percentage on the left.
- Display the equipped boots icon immediately to the right.
### Row 3 – Offhand Item
- Display the remaining durability or item count on the left.
- Display the item held in the offhand on the right.
### Right Column Alignment
- All equipment icons must align vertically.
- Durability values must be right-aligned next to their corresponding icons.
- Use the same icon size and row spacing as the left column.
- Both columns must have matching vertical positions.
## 2.4 Default Screen Position
Place the two columns in the lower half of the Minecraft screen.
Suggested initial positions:
- Left column: approximately 15% of screen width from the left edge.
- Right column: approximately 75% of screen width from the left edge.
- First row: approximately 58% of screen height.
- Second row: 24 GUI pixels below the first row.
- Third row: 24 GUI pixels below the second row.
Use screen-relative positioning where appropriate so the HUD remains usable across different resolutions and GUI scales.
## 2.5 Durability Text Appearance
Use Minecraft's standard pixel font.
Text must be clearly readable with a dark outline or shadow.
Durability colors:
- 61–100%: Bright green `#55FF55`.
- 31–60%: Yellow `#FFFF55`.
- 0–30%: Red `#FF5555`.
Main-hand and offhand item counters should use white `#FFFFFF`.
The durability text should be approximately the same visual height as the equipment icons.
Do not use oversized fonts.
## 2.6 Equipment Icons
Render actual Minecraft item icons.
Do not use emojis, Unicode armor symbols, or generic drawings.
Examples:
- Diamond helmet displays the actual diamond helmet item texture.
- Netherite chestplate displays the actual netherite chestplate texture.
- Iron leggings display the actual iron leggings texture.
- Enchanted equipment preserves its normal item appearance.
Icons must remain sharp and pixelated.
Do not add backgrounds or decorative frames.
If an equipment slot is empty, hide its icon and associated durability text in Style 1.
## 2.7 Style 1 HUD Editor
Add an **EDIT** button to the Style 1 settings.
Clicking EDIT opens the HUD editor.
The following six elements must be independently draggable:
1. Helmet icon and durability.
2. Chestplate icon and durability.
3. Main-hand item icon and counter.
4. Leggings icon and durability.
5. Boots icon and durability.
6. Offhand item icon and counter.
Each icon and its corresponding text must move together as one element.
Allow the player to click, hold, and drag each element using the left mouse button.
During editing, display a thin blue selection outline around the selected element.
Selection outlines must disappear outside editing mode.
Add three buttons:
**SAVE**
Save all element positions.
**CANCEL**
Discard unsaved changes from the current editing session.
**RESET**
Restore the default Style 1 layout.
All saved positions must persist after restarting Minecraft.
---
# 3. STYLE 2 – COMPACT ARMOR BAR
## 3.1 General Appearance
Style 2 must be a small, compact, horizontal armor bar.
It must resemble four connected Minecraft inventory slots arranged in a single row.
Unlike Style 1, Style 2 must have a dark rectangular background.
It must display only armor icons.
Do not display durability percentages, item counts, labels, or additional text.
The entire bar must behave as one HUD element.
## 3.2 Exact Slot Order
Display exactly four slots from left to right:
1. Helmet
2. Chestplate
3. Leggings
4. Boots
Do not change this order.
Each slot must contain the player's actual equipped armor item.
If a slot is empty, leave the slot background visible without an item icon.
## 3.3 Exact Dimensions
At the standard Minecraft GUI scale:
- Slot width: approximately 25 GUI pixels.
- Slot height: approximately 25 GUI pixels.
- Number of slots: 4.
- Total bar width: approximately 100 GUI pixels.
- Total bar height: approximately 25 GUI pixels.
- Item icon size: 16 × 16 GUI pixels.
All four slots must be directly connected without gaps.
Keep the entire bar compact.
The bar must preserve its proportions at different screen resolutions.
## 3.4 Background Design
Use a very dark, nearly black background.
Suggested background color:
`#17171C`
Suggested opacity:
75–85%.
Add a thin black outer border approximately one GUI pixel thick.
Separate the four slots using subtle vertical lines.
Suggested divider color:
`#38383E`
Each slot may have slightly darker internal shading.
Do not use:
- Rounded corners.
- Bright blue borders.
- Colorful gradients.
- Glowing effects.
- Large spacing between slots.
- Additional text.
The bar should look like a classic minimalist Minecraft PvP HUD.
## 3.5 Item Rendering
Each item icon must be centered inside its slot.
Use the real Minecraft item rendering system.
Preserve actual armor textures and enchantment appearances.
Do not draw generic armor symbols.
Do not display percentages or numbers.
## 3.6 LEFT / RIGHT Position Setting
Inside Style 2 settings, add:
**HUD Side: LEFT / RIGHT**
### LEFT
Position the compact armor bar near the bottom-left corner.
Default position:
- 8 GUI pixels from the left edge.
- 8 GUI pixels above the bottom edge.
### RIGHT
Position the compact armor bar near the bottom-right corner.
Default position:
- 8 GUI pixels from the right edge.
- 8 GUI pixels above the bottom edge.
Switching between LEFT and RIGHT must update the position immediately.
## 3.7 Style 2 HUD Editor
Add an **EDIT** button.
Clicking EDIT opens the HUD editor.
The entire armor bar must be draggable as one object.
The player must be able to:
- Click anywhere on the bar.
- Hold the left mouse button.
- Drag the bar to a new screen position.
- Release the mouse button.
- Save the new position.
All four slots must move together.
Do not allow individual slots to be moved independently.
During editing, display a thin blue outline around the entire bar.
Add:
**SAVE**
Save the current position.
**CANCEL**
Discard unsaved changes.
**RESET**
Restore the default position for the selected side.
Store separate custom positions for LEFT and RIGHT.
---
# 4. ARMOR HUD SETTINGS MENU
When the player clicks Armor HUD OPTIONS, open a settings panel.
At the top, display:
**Armor HUD Style**
Below it, show two selectable buttons:
**STYLE 1 | STYLE 2**
The selected style must have a bright blue background.
The inactive style must have a dark navy blue background.
Below the buttons, display a live preview of the selected style.
### Style 1 Preview
Show two groups of equipment icons and durability values.
The preview must represent the actual Style 1 layout.
### Style 2 Preview
Show a small horizontal bar containing four dark slots with armor icons.
Below the preview, display the relevant settings.
For Style 1:
- EDIT button.
For Style 2:
- LEFT / RIGHT selector.
- EDIT button.
Switching styles must update the actual HUD immediately.
---
# 5. ARMOR HUD FUNCTIONALITY
Armor HUD must read the local player's actual equipment.
Requirements:
- Detect equipped armor automatically.
- Update icons when armor changes.
- Update durability when equipment takes damage.
- Support standard Minecraft armor.
- Support compatible modded armor.
- Update main-hand and offhand items in Style 1.
- Never display fake equipped items during gameplay.
For damageable equipment, calculate remaining durability using:
Remaining Durability (%) = ((Maximum Durability - Current Damage) / Maximum Durability) × 100
Clamp the result between 0% and 100%.
For main-hand and offhand damageable items, display the remaining durability as an integer.
Avoid displaying invalid durability values for non-damageable items.
---
# PART 2 – HIT COLOR DAMAGE DETECTION FIX
# 6. Fix the Existing Hit Color Module
The current Hit Color implementation has an important problem.
It activates only when the local player attacks another entity.
This behavior must be completely corrected.
**Hit Color must activate whenever any visible living entity enters its damage animation state, regardless of who or what caused the damage.**
The effect must not depend on the local player's attack action.
## 6.1 Required Damage Sources
Hit Color must work when:
- The local player attacks another player.
- Another player attacks the local player.
- Another player attacks a different player.
- A player attacks a mob.
- A mob attacks a player.
- A mob attacks another mob.
- An entity receives fall damage.
- An entity receives fire damage.
- An entity receives lava damage.
- An entity receives explosion damage.
- An entity receives projectile damage.
- An entity receives other types of damage that trigger Minecraft's damage animation.
The local player must also display the custom damage color when receiving damage if the player model is visible, such as in third-person view.
## 6.2 Correct Damage Detection
Do not detect damage by checking whether the local player clicked the attack button.
Do not activate the effect based on weapon swings.
Instead, use Minecraft's existing damage animation state.
Use the appropriate Minecraft 1.21.4 entity rendering and damage animation APIs.
For example, use `hurtTime` or the equivalent synchronized damage state available in the selected mappings.
Requirements:
- Detect when an entity enters its damage animation.
- Apply the selected Hit Color during that animation.
- Stop applying the color when the animation ends.
- Do not activate when an attack misses.
- Do not activate when an entity does not enter a damage animation.
- Support damage animations synchronized by multiplayer servers.
- Do not create fake damage events.
Important: The client may not be able to verify every actual health reduction on multiplayer servers. The intended behavior is to follow Minecraft's visible damage animation state rather than guessing damage from local attacks.
## 6.3 Hit Color Rendering
When an entity enters its damage animation:
- Replace Minecraft's default red damage flash with the selected custom color.
- Apply the selected color to the entity's rendered model.
- Keep the custom color visible for the normal damage flash duration.
- Restore the normal entity appearance when the animation ends.
- Do not permanently change entity textures.
- Do not modify actual damage or health values.
The selected color must
Add Armor HUD using Counter32’s existing module, GUI, and config patterns.
Fix Hit Color to follow synchronized entity damage animation state.
Armor HUD is added with both styles, persistent draggable positions, settings controls, and category registration. Next I’m tracing Hit Color’s damage-state and render hooks.
Added Armor HUD to the MODS and HUD categories, with separated equipment/durability and compact armor-bar styles. Both styles have settings, live previews, draggable editors, save/reset/cancel controls, and persistent positions.
Changed Hit Color to follow each rendered living entity’s
hurtTime, so the color follows actual damage animations instead of local attack attempts. Removed the attack-only trigger and its timer tracker.
📄
pasted-code-1793200059406.txt
txt
154 lines
▶
# Counter32 Client – Critical Minecraft Crash Fix
## Minecraft Java Edition 1.21.4 | Fabric | Java 21
**IMPORTANT: Fix the Minecraft crash caused by or associated with Counter32 Client. Do not remove any existing features.**
## 1. Crash Description
Minecraft crashes while Counter32 Client is installed.
The crash screen identifies the following mods as potential causes:
- Counter32 Client
- Fabric Lifecycle Events (v1)
The crash report filename is:
`crash-2026-10-27_16.09.06-client.txt`
These are suspected causes, not confirmed root causes.
Investigate the actual crash instead of assuming that Fabric API itself is broken.
## 2. Find the Exact Cause
Inspect the project's source code, mixins, dependencies, and available crash logs.
Look for:
- `Caused by:`
- `NullPointerException`
- `MixinApplyError`
- `ClassCastException`
- `NoSuchMethodError`
- `ExceptionInInitializerError`
- Incorrect Fabric event registration
- Incorrect Minecraft 1.21.4 methods
Identify the exact class, method, and line responsible for the crash.
Do not guess the cause if the crash report is unavailable. Request the complete crash log when necessary.
## 3. Fix Client Initialization
Check the Counter32 Client initialization system.
Ensure that:
- Client-only functionality is registered in the correct client entry point.
- HUD rendering is initialized correctly.
- Keybinds are registered correctly.
- Configuration files load safely.
- Modules initialize in the correct order.
- No code accesses the Minecraft player before the player exists.
- No code accesses the world before the world is loaded.
- Event callbacks safely handle missing player or world instances.
Use appropriate null checks where necessary.
## 4. Fix Armor HUD
Inspect the newly added Armor HUD module.
Make sure it does not crash when:
- Minecraft starts.
- The player joins a world.
- The player disconnects.
- The player changes dimensions.
- Equipment slots are empty.
- The player opens the HUD editor.
- The GUI scale changes.
Only access player equipment when a valid player instance exists.
Do not remove either Armor HUD style.
## 5. Fix Hit Color
Inspect the Hit Color rendering implementation.
Check:
- Damage animation detection.
- Entity rendering mixins.
- Armor rendering compatibility.
- Correct Minecraft 1.21.4 method signatures.
- Safe handling of missing entities.
- Compatibility with vanilla entity rendering.
Hit Color must continue working whenever a visible living entity enters its damage animation state, regardless of who caused the damage.
Do not revert Hit Color to local-player attack detection.
## 6. Check Fabric Compatibility
Verify that the project uses compatible versions of:
- Minecraft 1.21.4
- Fabric Loader
- Fabric API
- Java 21
- Fabric Loom
- Minecraft mappings
Check `fabric.mod.json`, `build.gradle`, and all mixin configuration files.
Do not mix methods or mappings from different Minecraft versions.
## 7. Preserve Existing Features
Do not remove or disable:
- Hit Color
- No Fire
- Glint Color
- FPS
- Armor HUD
- Both Armor HUD styles
- HUD editing
- Custom colors
- HEX color input
- GUI animations
- Configuration saving
Preserve the existing Counter32 Client GUI and Right Shift keybind.
## 8. Compile and Test
After fixing the root cause:
1. Compile the project using Gradle.
2. Fix all compilation errors.
3. Launch Minecraft 1.21.4 with Counter32 Client.
4. Test joining a singleplayer world.
5. Test joining a multiplayer server.
6. Open the GUI using Right Shift.
7. Test Armor HUD and Hit Color.
8. Verify that Minecraft does not crash when entering or leaving a world.
If a test cannot be performed, clearly report that it has not been verified.
## 9. Final Requirement
**Fix the actual cause of the crash, not just the error message.**
Do not hide exceptions or silently disable broken modules.
Do not remove requested functionality to make the project compile.
Explain which files were changed, what caused the crash, and how it was fixed.
If the available information is insufficient, request the complete Minecraft crash report before making speculative changes.
The final project must remain compatible with Minecraft Java Edition 1.21.4 using Fabric and Java 21.
Locate the crash report, initialization paths, Armor HUD, Hit Color, mixins, and version configuration.
Trace the crash to a specific cause; if the report/source cannot establish it, request the complete crash log rather than guess.
Make only a targeted fix, using 1.21.4 source-verified APIs where needed, and report what could not be tested.I can’t identify or fix the actual crash from the available evidence: the project contains no crash report or log, so there’s no stack trace to tie the failure to a specific class, method, or line. I made no code changes rather than guess.
The source does show version-sensitive required mixins and client HUD callbacks, but neither is confirmed as the cause. Please provide the complete crash-2026-10-27_16.09.06-client.txt and, if available, the matching latest.log. The exact Caused by: section and full stack trace are needed to diagnose the crash. No compile or in-game test was performed.
📄
pasted-code-1793200884097.txt
txt
94 lines
▶
# Counter32 Client – URGENT CRASH FIX
## Minecraft 1.21.4 | Fabric | Java 21
My Minecraft crashes when Counter32 Client is installed.
The crash screen identifies these potential causes:
- Counter32 Client
- Fabric Lifecycle Events (v1)
**YOUR TASK: Find and fix the actual crash in Counter32 Client.**
### 1. Investigate the Crash
Analyze the entire existing project, especially:
- Client initialization and Fabric event registration.
- `fabric.mod.json` and `build.gradle`.
- All mixins and their target methods.
- Hit Color entity rendering.
- Armor HUD rendering and equipment detection.
- Configuration loading and saving.
- Compatibility with Minecraft 1.21.4.
Check for null references, incorrect initialization order, incompatible API calls, and invalid mixin injections.
Do not assume Fabric API is broken simply because it appears on the crash screen.
### 2. Fix Initialization Problems
Make sure the mod never accesses the player or world before they are available.
Check all lifecycle event callbacks.
Prevent invalid rendering operations when joining or leaving a world.
Ensure all client-side systems are initialized using the correct Fabric client entry point.
### 3. Fix Hit Color and Armor HUD
Inspect both modules carefully.
Hit Color must still activate when any visible living entity enters its damage animation, not only when the local player attacks.
Armor HUD must safely handle empty equipment slots, world loading, and player disconnection.
Fix incorrect rendering calls or mixins without removing either module.
### 4. Preserve Everything
Do not delete, disable, or replace any existing features, including:
- Hit Color
- No Fire
- Glint Color
- FPS
- Armor HUD Style 1 and Style 2
- HUD Editor
- Custom GUI
- Right Shift keybind
- Purple particle animations
- Configuration saving
### 5. Build and Verify
Use the correct dependencies and mappings for Minecraft 1.21.4, Fabric, and Java 21.
Compile the complete project and fix all compilation errors.
If a Minecraft test environment is available, launch the mod and test entering a world.
Check that the game no longer crashes.
### 6. Critical Instructions
Do not merely rewrite the same code.
Do not hide errors using empty catch blocks.
Do not remove features to avoid the crash.
Find the exact failing class and method, then correct the implementation.
If the crash report is unavailable, request it rather than inventing a cause.
After making changes, explain:
1. What caused the crash.
2. Which files were modified.
3. What was fixed.
4. Whether compilation succeeded.
5. Whether Minecraft was actually launched and tested.
**IMPORTANT: Fix Counter32 Client so it works on Minecraft Java Edition 1.21.4 Fabric while preserving all existing functionality.**
Inspect project initialization, HUD/rendering code, mixins, dependencies, and available logs for a concrete crash cause.
If the source identifies a fix, verify any Minecraft/Fabric signatures from the 1.21.4 source before editing; otherwise request the crash report.The project contains no crash report or log, so the actual failing class, method, and line cannot be established. I made no code changes rather than guess or risk disabling a feature.
The source review found no confirmed startup or world-entry fault. A malformed properties file could cause HitColorConfig.load() to throw an uncaught IllegalArgumentException, and mixin target mismatches are another possibility—but neither is supported by crash evidence, so neither is a confirmed cause.
Please attach the complete crash-2026-10-27_16.09.06-client.txt and, if available, the matching latest.log. No compilation or Minecraft launch test was performed.
package com.counter32;
import com.counter32.config.HitColorConfig;
import com.counter32.gui.HitColorScreen;
import com.counter32.hud.ArmorHud;
import com.counter32.hud.FpsHud;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.fabricmc.fabric.api.client.rendering.v1.HudLayerRegistrationCallback;
import net.fabricmc.fabric.api.client.rendering.v1.IdentifiedLayer;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import net.minecraft.util.Identifier;
public final class Counter32Client implements ClientModInitializer {
private static KeyBinding openMenuKey;
@Override
public void onInitializeClient() {
HitColorConfig.load();
HudLayerRegistrationCallback.EVENT.register(layeredDrawer -> layeredDrawer.attachLayerAfter(
IdentifiedLayer.MISC_OVERLAYS,
Identifier.of("counter32_client", "fps_hud"),
(context, tickCounter) -> {
FpsHud.render(context);
ArmorHud.render(context);
}
));
openMenuKey = KeyBindingHelper.registerKeyBinding(new KeyBinding(
"key.counter32_client.open_menu",
InputUtil.Type.KEYSYM,
InputUtil.GLFW_KEY_RIGHT_SHIFT,
"key.category.counter32_client.main"
));
ClientTickEvents.END_CLIENT_TICK.register(client -> {
while (openMenuKey.wasPressed()) {
if (client.currentScreen instanceof HitColorScreen screen) {
screen.beginClose();
} else if (client.currentScreen == null) {
client.setScreen(new HitColorScreen());
}
}
});
}
}