Refactor entity owner checks and enhance FULL_MODEL rotation support in ability entities

This commit is contained in:
Kam committed 2026-02-15 21:29:26 -05:00
1 parent ce24c0a4ff
commit eda8931b5f
6 files changed
+175 -57

No files matched your search

@@ -144,15 +144,19 @@ public class EntityAbilitySweeper extends Entity implements IEntityAdditionalSpa
return;
}
// Follow owner
Entity owner = getOwner();
if (owner == null) {
if (owner != null && owner.isDead) {
this.setDead();
return;
}
if (owner instanceof EntityNPCInterface && ((EntityNPCInterface) owner).isKilled()) {
this.setDead();
return;
}
// Update position to follow owner
this.setPosition(owner.posX, owner.posY + beamHeight, owner.posZ);
if (owner != null) {
this.setPosition(owner.posX, owner.posY + beamHeight, owner.posZ);
}
// Check if sweep is done
if (completedRotations >= numberOfRotations) {