mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-08 06:26:43 +01:00
Fixed placed spells not playing their death animations and/or getting stuck and impossible to remove
This commit is contained in:
parent
2910b8d29c
commit
575c1f7438
1 changed files with 7 additions and 5 deletions
|
@ -48,24 +48,26 @@ public abstract class AbstractDelegatingSpell implements Spell {
|
|||
|
||||
@Override
|
||||
public void setDead() {
|
||||
Spell spell = delegate.get();
|
||||
if (spell != null) {
|
||||
spell.setDead();
|
||||
if (delegate.get() instanceof Spell p) {
|
||||
p.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tickDying(Caster<?> caster) {
|
||||
if (delegate.get() instanceof Spell p) {
|
||||
p.tickDying(caster);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDead() {
|
||||
return delegate.get() == null || delegate.get().isDead();
|
||||
return !(delegate.get() instanceof Spell p) || p.isDead();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDying() {
|
||||
return false;
|
||||
return delegate.get() instanceof Spell p && p.isDying();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue