3.2.5 Fix

This commit is contained in:
nulli0n 2022-08-05 19:50:30 +05:00
parent 1354ddf9bd
commit 559e70da9a
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ public class EnchantElementalProtection extends IEnchantChanceTemplate {
private static final EntityDamageEvent.DamageCause[] DAMAGE_CAUSES = new EntityDamageEvent.DamageCause[] {
EntityDamageEvent.DamageCause.POISON, EntityDamageEvent.DamageCause.WITHER,
EntityDamageEvent.DamageCause.MAGIC, EntityDamageEvent.DamageCause.FREEZE,
EntityDamageEvent.DamageCause.SONIC_BOOM, EntityDamageEvent.DamageCause.LIGHTNING,
/*EntityDamageEvent.DamageCause.SONIC_BOOM, */EntityDamageEvent.DamageCause.LIGHTNING,
};
private Scaler protectionAmount;
@ -98,7 +98,7 @@ public class EnchantElementalProtection extends IEnchantChanceTemplate {
}
if (this.isProtectionAsModifier()) {
e.setDamage(Math.max(0, 1D - e.getDamage() * protectionAmount));
e.setDamage(Math.max(0, e.getDamage() * (1D - protectionAmount)));
}
else {
e.setDamage(Math.max(0, e.getDamage() - protectionAmount));