mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Only target living entities for the homing spells
This commit is contained in:
parent
a6cb13e27a
commit
fbf96005ae
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ public class UnicornCastingAbility extends AbstractSpellCastingAbility {
|
||||||
} else {
|
} else {
|
||||||
player.setAnimation(Animation.ARMS_UP, Animation.Recipient.HUMAN);
|
player.setAnimation(Animation.ARMS_UP, Animation.Recipient.HUMAN);
|
||||||
if (s instanceof HomingSpell homer) {
|
if (s instanceof HomingSpell homer) {
|
||||||
TraceHelper.findEntity(player.asEntity(), homer.getRange(player), 1, EntityPredicates.VALID_ENTITY).ifPresent(homer::setTarget);
|
TraceHelper.findEntity(player.asEntity(), homer.getRange(player), 1, EntityPredicates.VALID_LIVING_ENTITY).ifPresent(homer::setTarget);
|
||||||
}
|
}
|
||||||
player.playSound(USounds.SPELL_CAST_SUCCESS, 0.05F, 2.2F);
|
player.playSound(USounds.SPELL_CAST_SUCCESS, 0.05F, 2.2F);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue