Skip to content

Commit

Permalink
Check for enderdragon death
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Mar 28, 2023
1 parent f297808 commit 9b7a6e0
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 11 deletions.
Expand Up @@ -156,7 +156,8 @@ protected void L() {
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;
Expand Down
Expand Up @@ -157,7 +157,8 @@ protected void L() {
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;
Expand Down
Expand Up @@ -157,7 +157,8 @@ protected void L() {
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;
Expand Down
Expand Up @@ -168,7 +168,8 @@ public boolean isLeashed() {
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;
Expand Down
Expand Up @@ -165,7 +165,8 @@ public boolean isLeashed() {
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;
Expand Down
Expand Up @@ -160,7 +160,7 @@ public void movementTick() {
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;
Expand Down
Expand Up @@ -160,7 +160,7 @@ public void movementTick() {
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;
Expand Down
Expand Up @@ -63,7 +63,7 @@ public void aiStep() {
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();
Expand Down
Expand Up @@ -65,7 +65,7 @@ public void aiStep() {
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();
Expand Down
Expand Up @@ -66,7 +66,7 @@ public void aiStep() {
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();
Expand Down Expand Up @@ -105,7 +105,6 @@ public void aiStep() {
setPos(getX() + mot.x, getY() + mot.y, getZ() + mot.z);
setDeltaMovement(mot);
}

} else {
super.aiStep();
}
Expand Down

0 comments on commit 9b7a6e0

Please sign in to comment.