get Effective Damage
fun LivingEntity.getEffectiveDamage(source: DamageSource, damage: Float, ignoreShield: Boolean = false): Float
Applies armor, enchantments, effects, etc. to the damage and returns the damage that is actually applied. This function is so damn ugly that I turned off code smell analysis for it.