1
0
mirror of https://github.com/CitizensDev/Citizens2.git synced 2025-01-09 09:57:33 +01:00

Check for enderdragon death

This commit is contained in:
fullwall 2023-03-29 02:23:44 +08:00
parent f29780874d
commit 9b7a6e0a65
10 changed files with 15 additions and 11 deletions
v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity
v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity
v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity
v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity
v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity
v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity
v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity
v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity
v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity
v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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();

View File

@ -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();
}