Use target lifetime rather than construct lifetime when dealing periodic damage; means targets don't all get damaged at once

This commit is contained in:
Electroblob77
2020-01-25 22:50:45 +00:00
parent 40e77728ad
commit 6cd6411c25
3 changed files with 25 additions and 27 deletions
@@ -62,7 +62,7 @@ public class EntityHealAura extends EntityMagicConstruct {
target.motionZ = velZ;
}
}else if(target.getHealth() < target.getMaxHealth() && this.ticksExisted % 5 == 0){
}else if(target.getHealth() < target.getMaxHealth() && target.ticksExisted % 5 == 0){
target.heal(Spells.healing_aura.getProperty(Spell.HEALTH).floatValue() * damageMultiplier);
}
}