Skip to content

Commit

Permalink
Merge pull request #993 from JasperLorelai/main
Browse files Browse the repository at this point in the history
Fix deprecation condition
  • Loading branch information
TonytheMacaroni authored Mar 7, 2025
2 parents 16b249c + 34ccdc2 commit f7a3369
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public DotSpell(MagicConfig config, String spellName) {
activeDots = new HashMap<>();

MagicSpells.getDeprecationManager().addDeprecation(this, DAMAGE_TYPE_DEPRECATION_NOTICE,
!damage.isConstant() || damage.get() > 0
!damageType.isConstant() || damageType.get() != DamageCause.ENTITY_ATTACK
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public boolean canTarget(LivingEntity caster, Entity target, boolean targetPlaye
if (targetCasterPassenger && target instanceof LivingEntity && target.isInsideVehicle() && caster.equals(target.getVehicle())) return true;
if (targetCasterMount && target instanceof LivingEntity && caster.isInsideVehicle() && target.equals(caster.getVehicle())) return true;

if (targetEntityTarget && (caster instanceof Creature creature) && creature.getTarget() != null && ((Creature) caster).getTarget().equals(target)) return true;
if (targetEntityTarget && (caster instanceof Creature creature) && creature.getTarget() != null && creature.getTarget().equals(target)) return true;
if (types.contains(target.getType())) return true;
return false;
}
Expand Down

0 comments on commit f7a3369

Please sign in to comment.