diff --git a/gradle.properties b/gradle.properties index 2b6282f4..91c79c62 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ minecraft.version=1.7.10 forge.version=10.13.4.1614-1.7.10 -mod.version=1.7.2-GTNH +mod.version=1.7.3-GTNH diff --git a/src/main/java/atomicstryker/infernalmobs/common/mods/MM_Vengeance.java b/src/main/java/atomicstryker/infernalmobs/common/mods/MM_Vengeance.java index 89f278bb..404af571 100644 --- a/src/main/java/atomicstryker/infernalmobs/common/mods/MM_Vengeance.java +++ b/src/main/java/atomicstryker/infernalmobs/common/mods/MM_Vengeance.java @@ -24,15 +24,12 @@ public float onHurt(EntityLivingBase mob, DamageSource source, float damage) { if (source.getEntity() != null && source.getEntity() != mob && !InfernalMobsCore.instance().isInfiniteLoop(mob, source.getEntity())) { - if (maxReflectDamage <= 0.0f) + float reflectedDamage = Math.min(mob.getHealth(), Math.max(damage * reflectMultiplier, 1)); + if (maxReflectDamage > 0.0f) { - source.getEntity().attackEntityFrom(DamageSource.causeMobDamage(mob), Math.max(damage * reflectMultiplier, 1)); - } - else - { - source.getEntity().attackEntityFrom(DamageSource.causeMobDamage(mob), - Math.min(maxReflectDamage, Math.max(damage * reflectMultiplier, 1))); + reflectedDamage = Math.min(maxReflectDamage, reflectedDamage); } + source.getEntity().attackEntityFrom(DamageSource.causeMobDamage(mob), reflectedDamage); } return super.onHurt(mob, source, damage);