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) {
|
protected boolean applyEntities(Caster<?> source, Vec3d pos) {
|
||||||
return source.findAllEntitiesInRange(Math.max(0, 3 + getTraits().get(Trait.POWER)), i -> applyEntitySingle(source, i)).count() > 0;
|
return source.findAllEntitiesInRange(Math.max(0, 3 + getTraits().get(Trait.POWER)), e -> {
|
||||||
}
|
LivingEntity master = source.getMaster();
|
||||||
|
return (!(e.equals(source.asEntity()) || e.equals(master)) ||
|
||||||
protected boolean applyEntitySingle(Caster<?> source, Entity e) {
|
(master instanceof PlayerEntity && !EquinePredicates.PLAYER_UNICORN.test(master))) && !(e instanceof ItemEntity)
|
||||||
LivingEntity master = source.getMaster();
|
&& !(e instanceof Caster<?>);
|
||||||
|
}).filter(e -> {
|
||||||
if ((!(e.equals(source.asEntity()) || e.equals(master)) ||
|
|
||||||
(master instanceof PlayerEntity && !EquinePredicates.PLAYER_UNICORN.test(master))) && !(e instanceof ItemEntity)
|
|
||||||
&& !(e instanceof Caster<?>)) {
|
|
||||||
e.setOnFireFor(60);
|
e.setOnFireFor(60);
|
||||||
e.damage(getDamageCause(source, e), 0.1f);
|
e.damage(getDamageCause(source, e), 0.1f);
|
||||||
playEffect(source.asWorld(), e.getBlockPos());
|
playEffect(source.asWorld(), e.getBlockPos());
|
||||||
return true;
|
return true;
|
||||||
}
|
})
|
||||||
|
.count() > 0;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected DamageSource getDamageCause(Caster<?> source, Entity target) {
|
protected DamageSource getDamageCause(Caster<?> source, Entity target) {
|
||||||
|
|
Loading…
Reference in a new issue