mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
This commit is contained in:
parent
9d90932ce9
commit
37c62b7d0c
1 changed files with 8 additions and 12 deletions
|
@ -122,22 +122,18 @@ public class FireSpell extends AbstractAreaEffectSpell implements ProjectileDele
|
|||
}
|
||||
|
||||
protected boolean applyEntities(Caster<?> source, Vec3d pos) {
|
||||
return source.findAllEntitiesInRange(Math.max(0, 3 + getTraits().get(Trait.POWER)), i -> applyEntitySingle(source, i)).count() > 0;
|
||||
}
|
||||
|
||||
protected boolean applyEntitySingle(Caster<?> source, Entity e) {
|
||||
return source.findAllEntitiesInRange(Math.max(0, 3 + getTraits().get(Trait.POWER)), e -> {
|
||||
LivingEntity master = source.getMaster();
|
||||
|
||||
if ((!(e.equals(source.asEntity()) || e.equals(master)) ||
|
||||
return (!(e.equals(source.asEntity()) || e.equals(master)) ||
|
||||
(master instanceof PlayerEntity && !EquinePredicates.PLAYER_UNICORN.test(master))) && !(e instanceof ItemEntity)
|
||||
&& !(e instanceof Caster<?>)) {
|
||||
&& !(e instanceof Caster<?>);
|
||||
}).filter(e -> {
|
||||
e.setOnFireFor(60);
|
||||
e.damage(getDamageCause(source, e), 0.1f);
|
||||
playEffect(source.asWorld(), e.getBlockPos());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
.count() > 0;
|
||||
}
|
||||
|
||||
protected DamageSource getDamageCause(Caster<?> source, Entity target) {
|
||||
|
|
Loading…
Reference in a new issue