This mod aims to be a library, but also has config options that makes possible to server administrators or modpack creators modify the same as other mods.
This mod has interesting options as changing cooldown options for each damage type and modifiying or disabling the attack bar of players.
Info: this mod is server side, but has client utility
What this mod does?
For context, minecraft cooldown added in 1.9 works in 2 ways, 1st the player's attack bar (the attack speed) and 2nd the mob's/player's invulnerability time. The 2nd has very unknowed problems with the way that is programmed to be. When an entity is hit (in any way) the entity instanly has a invulnerability of 0.5 sec to ANY DAMAGE, not matter the type. And this invulnerability is added in that INSTANT, not in the next tick, which provoques that if someone receives 2 damages at the same time one of the damages will be completely ignored... In my opinion this is a unpure way to manage cooldowns.
This mods adds its own damage cooldown system, which is completely modifiable:
Custom damage cooldown system.
- The first thing, now each type of damage has its own cooldown, so if you are being hit by another player and a zombie, you will receive damage from both at the same time.
- The second thing, now the server adds the cooldown in the next tick, in other words, if you receive 2 hits at the same time, they won't be ignore.
Completely modifiable.
Both users and other devs can tweak a lot of options of this mod, in default they are set in order to act like minecraft vanilla:
For each damage type, you can tweak this options:
- COOLDOWN: The cooldown in ticks (default: 10)
- PRE COOLDOWN: The time in ticks before the cooldown starts (default: 0)
- MAX IN TICK (general): The quantity of times an entity can receive that damage in the same tick (default: 1)
- MAX IN TICK (specific): The same as general but only by the same specific entity (default: 1)
In general, you can tweak this options:
- When player attacks without full charging the attack bar: (OPTIONS: VANILLA, FULL, MULTIPLIED_VANILLA, MULTIPLIED_FULL)(if you chose FULL or MULTIPLIED_FULL, it will disable the players attack bar).
- More options that expand the above option are explained in the config files.
HOW TO USE
FOR COMMON USERS
There are 2 config files:
damage_tweaker.json: This file will let you modify for each damage type in the game the properties that i mentioned before. If you type "default", the game will get the value in the other config file (see below). The first you will see is a lot of damage id's inside a group called "any mob", that group affects every entity in the game included players, but outside that group(almost at the end of the file) you can see examples of other entities, just put the id (minecraft/mod:entityid) and specify there the properties of each damage id you want the entity have different to others. For clarifying, the id of the entity there is the source entity, in other words, the entity that makes the damage, if the damage doesn't have a source entity, it will chose the option in "any mob".
damage_tweaker-server.toml: this file let you config the default options and the general options that i mention before.
FOR MODDERS OR DETAILED USERS USE THERE IS ANOTHER GUIDE IN GITHUB.