mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-24 05:47:59 +01:00
Don't trap the thrower
This commit is contained in:
parent
3789c31062
commit
871edea0d7
1 changed files with 3 additions and 0 deletions
|
@ -186,6 +186,8 @@ public class ChangelingTrapSpell extends AbstractSpell implements TossedMagicEff
|
|||
} else {
|
||||
existing.enforce(e);
|
||||
}
|
||||
|
||||
e.spawnParticles(ParticleTypes.DRIPPING_LAVA, 20);
|
||||
}
|
||||
|
||||
protected boolean canAffect(Entity e) {
|
||||
|
@ -199,6 +201,7 @@ public class ChangelingTrapSpell extends AbstractSpell implements TossedMagicEff
|
|||
if (caster.isLocal()) {
|
||||
caster.findAllEntitiesInRange(5)
|
||||
.filter(this::canAffect)
|
||||
.filter(e -> e != caster.getOwner())
|
||||
.map(e -> CasterUtils.toCaster(e))
|
||||
.filter(Optional::isPresent)
|
||||
.map(Optional::get)
|
||||
|
|
Loading…
Reference in a new issue