Fix dismiss animations on placed spells

This commit is contained in:
Sollace 2024-05-23 17:37:27 +01:00
parent 14084e270b
commit d909ee47f1
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -136,11 +136,10 @@ public class CastSpellEntity extends LightEmittingEntity implements Caster<CastS
} }
spells.getSlots().get().ifPresent(spell -> { spells.getSlots().get().ifPresent(spell -> {
var entry = Ether.get(getWorld()).getOrCreate(spell, this); Ether.get(getWorld()).getOrCreate(spell, this);
if (entry.hasChanged()) {
//updatePositionAndAngles(getX(), getY(), getZ(), entry.getYaw(), entry.getPitch());
}
}); });
} else if (isDead()) {
spells.getSlots().clear();
} }
prevDeathTicks = deathTicks; prevDeathTicks = deathTicks;
@ -152,7 +151,7 @@ public class CastSpellEntity extends LightEmittingEntity implements Caster<CastS
@Override @Override
public void kill() { public void kill() {
spells.getSlots().clear(); setDead(true);
} }
public boolean isDead() { public boolean isDead() {