Master Your Combat Metrics

A lightweight, client-side Fabric mod that brings real-time analytics to your Minecraft HUD. Track combos, monitor damage output, and analyze defensive performance without interrupting gameplay.

Fabric 1.21.5 Client-Side Java 21

Live HUD Simulator

Experience the core functionality of AttackCounter right here. This interactive demo runs the actual logic found in `CombatTracker.java`. Click the buttons to simulate combat events and watch the HUD react. Observe how the Combo resets if you wait too long (default 3s).

Mod: Enabled
Press 'K' to toggle mod (simulated)

Combo Logic Visualizer

Visualizes the combo counter relative to the `comboResetTime`. Each hit resets the decay timer.

Configuration & Customization

Customize behavior via `config/attackcounter.json`. Adjust timings to fit your PVP style or toggle specific metrics to keep your HUD clean. Changes below update the Simulator logic above instantly.

Visibility Toggles

Timing & Layout

60

20 ticks = 1 second

0
attackcounter.json

                

Technical Architecture

Understanding the data flow is crucial for developers and curious players. The mod uses Mixins to intercept game events, a central CombatTracker to process logic, and a CombatHud renderer. Click any block below to see implementation details.

🎮

Events

Attack & Damage
⚙️

CombatTracker

Logic & State
🖥️

CombatHud

Rendering

Event Interception

The mod hooks into Minecraft's AttackEntityCallback to detect player attacks. For damage calculations, it uses Mixins:

LivingEntityMixin injects into the damage method @At("RETURN"). This ensures stats are only updated if damage is actually applied.

⬇️ Installation Guide

  • 01

    Install Fabric Loader and Fabric API for Minecraft 1.21.5.

  • 02

    Download attackcounter.jar from the releases page.

  • 03

    Place the file in your .minecraft/mods folder.

  • 04

    Launch the game using the Fabric profile. Config is generated on first run.

⌨️ Controls & Commands

Action Default Key
Toggle Mod K
Note: Toggling the mod prints a status message to the chat/action bar.