File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
common/src/main/kotlin/com/lambda/util/combat Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1818package com.lambda.util.combat
1919
2020import com.lambda.context.SafeContext
21- import com.lambda.util.math.distSq
21+ import com.lambda.util.math.dist
2222import com.lambda.util.world.fastEntitySearch
2323import net.minecraft.client.world.ClientWorld
2424import net.minecraft.entity.EquipmentSlot
@@ -108,10 +108,10 @@ object CombatUtils {
108108 * @param power The [power of the explosion](https://minecraft.wiki/w/Explosion#Damage)
109109 */
110110 fun SafeContext.explosionDamage (position : Vec3d , entity : LivingEntity , power : Double ): Double {
111- val distance = entity distSq position
111+ val distance = entity dist position
112112
113113 val range = power * 2
114- val impact = (1 - distance / range) * Explosion .getExposure(position, entity) * 0.4
114+ val impact = (1 - distance / range) * Explosion .getExposure(position, entity)
115115 val damage = (impact * impact + impact) / 2.0 * 7.0 * range + 1
116116
117117 return Explosion .createDamageSource(world, null ).scale(world, entity, damage)
You can’t perform that action at this time.
0 commit comments