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.
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).
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
20 ticks = 1 second
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
CombatTracker
CombatHud
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.jarfrom the releases page. -
03
Place the file in your
.minecraft/modsfolder. -
04
Launch the game using the Fabric profile. Config is generated on first run.
⌨️ Controls & Commands
| Action | Default Key |
|---|---|
| Toggle Mod | K |