diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EnderDragonController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EnderDragonController.java index b60cca267..72dc32199 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EnderDragonController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EnderDragonController.java @@ -156,7 +156,8 @@ public class EnderDragonController extends MobEntityController { public void n() { if (npc != null) { npc.update(); - + } + if (npc != null && getHealth() > 0) { if (this.c < 0) { for (int i = 0; i < this.b.length; ++i) { this.b[i][0] = this.yaw; diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EnderDragonController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EnderDragonController.java index 7d6564470..82105deac 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EnderDragonController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EnderDragonController.java @@ -157,7 +157,8 @@ public class EnderDragonController extends MobEntityController { public void n() { if (npc != null) { npc.update(); - + } + if (npc != null && getHealth() > 0) { if (this.c < 0) { for (int i = 0; i < this.b.length; ++i) { this.b[i][0] = this.yaw; diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java index 7272426f6..c9b187c4c 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java @@ -157,7 +157,8 @@ public class EnderDragonController extends MobEntityController { public void n() { if (npc != null) { npc.update(); - + } + if (npc != null && getHealth() > 0) { if (this.c < 0) { for (int i = 0; i < this.b.length; ++i) { this.b[i][0] = this.yaw; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java index 8353a0319..9a2ac19c2 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java @@ -168,7 +168,8 @@ public class EnderDragonController extends MobEntityController { public void movementTick() { if (npc != null) { npc.update(); - + } + if (npc != null && getHealth() > 0) { if (this.c < 0) { for (int i = 0; i < this.b.length; ++i) { this.b[i][0] = this.yaw; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java index 0c0bc3533..d25258e35 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java @@ -165,7 +165,8 @@ public class EnderDragonController extends MobEntityController { public void movementTick() { if (npc != null) { npc.update(); - + } + if (npc != null && getHealth() > 0) { if (this.d < 0) { for (int i = 0; i < this.c.length; ++i) { this.c[i][0] = this.yaw; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java index fa66e064e..86cd7548b 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java @@ -160,7 +160,7 @@ public class EnderDragonController extends MobEntityController { npc.update(); NMSImpl.updateMinecraftAIState(npc, this); } - if (npc != null && !npc.useMinecraftAI()) { + if (npc != null && !npc.useMinecraftAI() && getHealth() > 0) { if (this.d < 0) { for (int i = 0; i < this.c.length; ++i) { this.c[i][0] = this.yaw; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java index 958bb3d91..a35242e19 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java @@ -160,7 +160,7 @@ public class EnderDragonController extends MobEntityController { npc.update(); NMSImpl.updateMinecraftAIState(npc, this); } - if (npc != null && !npc.useMinecraftAI()) { + if (npc != null && !npc.useMinecraftAI() && !dl()) { if (this.d < 0) { for (int i = 0; i < this.c.length; ++i) { this.c[i][0] = this.yaw; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java index 805198005..2174ada79 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java @@ -63,7 +63,7 @@ public class EnderDragonController extends MobEntityController { npc.update(); NMSImpl.updateMinecraftAIState(npc, this); } - if (npc != null && !npc.useMinecraftAI()) { + if (npc != null && !npc.useMinecraftAI() && !isDeadOrDying()) { if (this.posPointer < 0) { for (int i = 0; i < this.positions.length; ++i) { this.positions[i][0] = this.getYRot(); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java index dd4703f98..467cf86cb 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java @@ -65,7 +65,7 @@ public class EnderDragonController extends MobEntityController { npc.update(); NMSImpl.updateMinecraftAIState(npc, this); } - if (npc != null && !npc.useMinecraftAI()) { + if (npc != null && !npc.useMinecraftAI() && !isDeadOrDying()) { if (this.posPointer < 0) { for (int i = 0; i < this.positions.length; ++i) { this.positions[i][0] = this.getYRot(); diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java index 770c427d3..625f7ddb6 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java @@ -66,7 +66,7 @@ public class EnderDragonController extends MobEntityController { npc.update(); } - if (npc != null && !npc.useMinecraftAI()) { + if (npc != null && !npc.useMinecraftAI() && !isDeadOrDying()) { if (this.posPointer < 0) { for (int i = 0; i < this.positions.length; ++i) { this.positions[i][0] = this.getYRot(); @@ -105,7 +105,6 @@ public class EnderDragonController extends MobEntityController { setPos(getX() + mot.x, getY() + mot.y, getZ() + mot.z); setDeltaMovement(mot); } - } else { super.aiStep(); }