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
@@ -65,7 +65,7 @@ public class EntityBubble extends EntityMagicConstruct {
if(isDarkOrb){
if(WizardryUtilities.getRider(this) != null
&& this.ticksExisted % Spells.entrapment.getProperty(Entrapment.DAMAGE_INTERVAL).intValue() == 0){
&& WizardryUtilities.getRider(this).ticksExisted % Spells.entrapment.getProperty(Entrapment.DAMAGE_INTERVAL).intValue() == 0){
if(this.getCaster() != null){
WizardryUtilities.getRider(this).attackEntityFrom(
MagicDamage.causeIndirectMagicDamage(this, getCaster(), DamageType.MAGIC),