mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 20:25:13 +00:00
Refactor entity owner checks and enhance FULL_MODEL rotation support in ability entities
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user