Damage Tweaker +API
This modification serves as a library for developers while simultaneously offering server administrators and pack creators convenient configuration options via configuration files.
Among the most interesting settings are the ability to set cooldowns for different damage types and completely disabling or modifying the attack cooldown indicator for players.
Note: the mod operates server-side but includes auxiliary client components.
Solving the Problem of Repeated Damage Handling
Since Minecraft version 1.9, the damage cooldown mechanism has been based on two components: the player's own attack speed and the invulnerability time for mobs/players. Both have imperfections. The invulnerability timer activates instantly and lasts for 0.5 seconds after taking damage, blocking any subsequent attacks. This can cause some damage instances to be completely ignored by the server.
Damage Tweaker replaces the built-in system with a more stable and flexible alternative:
- Individual cooldowns for different damage types. This allows receiving and dealing different types of damage simultaneously.
- Delayed cooldown application until the next tick. Two attacks received within one tick are no longer ignored - calculations become precise.
Available Configuration Options
The modified system's configuration is fully controllable by both mod developers and regular users.
For Different Damage Categories
When configuring for each category you can modify the following parameters:
- Cooldown: time in ticks between damage instances (default: 10).
- Pre-cooldown: additional period before the next damage cooldown begins (0 ticks by default).
- Max per tick (general): limit applied to each entity within one tick (default: 1).
- Max per tick (specific): same as above but separately for each specific entity (default: 1).
General Parameters
Additionally, you can define system behavior when attacks aren't fully charged:
Available options VANILLA, FULL, MULTIPLIED_VANILLA, and MULTIPLIED_FULL also allow disabling the attack bar for players. Details and related settings are documented in configuration files.
How to Use?
For Standard Parameter Adjustment
The mod includes 2 main configuration files:
-
damage_tweaker.json. Contains categorized damage type lists. By mod name and entity ID, you can define damage characteristics for any mob or player. Using "default" as value will pull the parameter from the standard file, but it's only accessible after game loading. File location varies between mobile and desktop client versions.
-
damage_tweaker-server.toml. Defines default parameters used by the system for all entities unless individual settings exist within damage_tweaker.json.
Developers should thoroughly review the complete API usage guide on GitHub.