Damage Modifiers
Fine-tuning the damage based on conditions
Last updated
Fine-tuning the damage based on conditions
Last updated
Damage modifiers modify the amount of damage dealt based on my factors, like armor, enchantments, potions, movement, hit point, and entity type.
Every weapon, by default, uses the Damage_Modifiers
section from config.yml. However, you might want your weapon to override those modifiers. Check out from the Damage module.
The minimum percentage of damage. 0%
means it is possible for a bullet to deal 0 damage. You probably want to set this a bit higher, like 20%
.
The maximum percentage of damage. You should set this a bit higher then 100%
.
Gets the armor value of the damaged entity (includes the armor they are wearing, custom armor attributes, and per-entity armor attributes). Remember that full diamond armor is 20 armor points, so don't set this number too high (-5%
is probably the highest you want to go).
A list of armor pieces and their hardcodes resistances.
This feature is hard to use correctly, so you should probably use Per_Armor_Point instead.
The following example will do 8% less damage for each projectile protection level and 5% less for each level of protection.
In 1.12.2
, the enchantments use the old format.
Headshot damage modifier (headshots deal high damage?)
Body shot damage modifier (body shots deal medium damage?)
Arm shot damage modifier (arm shots deal less damage?)
Leg shot damage modifier (leg shots deal less damage?)
Foot shot damage modifier (foot shots do minor damage?)
Modify damage if the victim is sneaking (as if they are braced for impact).
Modify damage if the victim is walking.
Modify damage if the victim is swimming in water.
Modify damage if the victim is sprinting.
Modify damage if the victim is in the air when damaged.
Reduce incoming damage when the victim is blocking with their shield and facing the damage.
The following example does double damage to zombies:
The following example does 10% more damage to entities with weakness.
A list of enchantments and their modifiers. The modifier is multiplied by the enchantment level. Use the list.
A list of and modifiers.
A list of and modifier.