mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-21 23:01:24 +01:00
More ender dragon fixes
This commit is contained in:
parent
efff2ff9ab
commit
d8b7a37543
@ -108,7 +108,7 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
Vec3D old = new Vec3D(motX, motY, motZ);
|
||||
boolean res = super.dealDamage(source, f);
|
||||
if (getDragonControllerManager().a() == DragonControllerPhase.k) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.k) {
|
||||
motX = old.x;
|
||||
motY = old.y;
|
||||
motZ = old.z;
|
||||
@ -158,7 +158,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
if (npc != null && getHealth() > 0) {
|
||||
if (npc != null) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.j) {
|
||||
setHealth(0F);
|
||||
return;
|
||||
}
|
||||
if (this.c < 0) {
|
||||
for (int i = 0; i < this.b.length; ++i) {
|
||||
this.b[i][0] = this.yaw;
|
||||
|
@ -108,7 +108,7 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
Vec3D old = new Vec3D(motX, motY, motZ);
|
||||
boolean res = super.dealDamage(source, f);
|
||||
if (getDragonControllerManager().a() == DragonControllerPhase.k) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.k) {
|
||||
motX = old.x;
|
||||
motY = old.y;
|
||||
motZ = old.z;
|
||||
@ -159,7 +159,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
if (npc != null && getHealth() > 0) {
|
||||
if (npc != null) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.j) {
|
||||
setHealth(0F);
|
||||
return;
|
||||
}
|
||||
if (this.c < 0) {
|
||||
for (int i = 0; i < this.b.length; ++i) {
|
||||
this.b[i][0] = this.yaw;
|
||||
|
@ -108,7 +108,7 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
Vec3D old = new Vec3D(motX, motY, motZ);
|
||||
boolean res = super.dealDamage(source, f);
|
||||
if (getDragonControllerManager().a() == DragonControllerPhase.k) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.k) {
|
||||
motX = old.x;
|
||||
motY = old.y;
|
||||
motZ = old.z;
|
||||
@ -159,7 +159,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
if (npc != null && getHealth() > 0) {
|
||||
if (npc != null) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.j) {
|
||||
setHealth(0F);
|
||||
return;
|
||||
}
|
||||
if (this.c < 0) {
|
||||
for (int i = 0; i < this.b.length; ++i) {
|
||||
this.b[i][0] = this.yaw;
|
||||
|
@ -124,7 +124,7 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
Vec3D old = new Vec3D(motX, motY, motZ);
|
||||
boolean res = super.dealDamage(source, f);
|
||||
if (getDragonControllerManager().a() == DragonControllerPhase.HOVER) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.HOVER) {
|
||||
motX = old.x;
|
||||
motY = old.y;
|
||||
motZ = old.z;
|
||||
@ -170,7 +170,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
if (npc != null && getHealth() > 0) {
|
||||
if (npc != null) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.DYING) {
|
||||
setHealth(0F);
|
||||
return;
|
||||
}
|
||||
if (this.c < 0) {
|
||||
for (int i = 0; i < this.b.length; ++i) {
|
||||
this.b[i][0] = this.yaw;
|
||||
|
@ -115,7 +115,7 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
Vec3D old = getMot();
|
||||
boolean res = super.dealDamage(source, f);
|
||||
if (getDragonControllerManager().a() == DragonControllerPhase.HOVER) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.HOVER) {
|
||||
setMot(old);
|
||||
}
|
||||
return res;
|
||||
@ -167,7 +167,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
if (npc != null && getHealth() > 0) {
|
||||
if (npc != null) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.DYING) {
|
||||
setHealth(0F);
|
||||
return;
|
||||
}
|
||||
if (this.d < 0) {
|
||||
for (int i = 0; i < this.c.length; ++i) {
|
||||
this.c[i][0] = this.yaw;
|
||||
|
@ -108,7 +108,7 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
Vec3D old = getMot();
|
||||
boolean res = super.dealDamage(source, f);
|
||||
if (getDragonControllerManager().a() == DragonControllerPhase.HOVER) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.HOVER) {
|
||||
setMot(old);
|
||||
}
|
||||
return res;
|
||||
@ -161,7 +161,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
npc.update();
|
||||
NMSImpl.updateMinecraftAIState(npc, this);
|
||||
}
|
||||
if (npc != null && !npc.useMinecraftAI() && getHealth() > 0) {
|
||||
if (npc != null && !npc.useMinecraftAI()) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.DYING) {
|
||||
setHealth(0F);
|
||||
return;
|
||||
}
|
||||
if (this.d < 0) {
|
||||
for (int i = 0; i < this.c.length; ++i) {
|
||||
this.c[i][0] = this.yaw;
|
||||
|
@ -108,7 +108,7 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
Vec3D old = getMot();
|
||||
boolean res = super.dealDamage(source, f);
|
||||
if (getDragonControllerManager().a() == DragonControllerPhase.HOVER) {
|
||||
if (getDragonControllerManager().a().getControllerPhase() == DragonControllerPhase.HOVER) {
|
||||
setMot(old);
|
||||
}
|
||||
return res;
|
||||
@ -161,7 +161,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
npc.update();
|
||||
NMSImpl.updateMinecraftAIState(npc, this);
|
||||
}
|
||||
if (npc != null && !npc.useMinecraftAI() && !dl()) {
|
||||
if (npc != null && !npc.useMinecraftAI()) {
|
||||
if (dl()) {
|
||||
setHealth(0F);
|
||||
return;
|
||||
}
|
||||
if (this.d < 0) {
|
||||
for (int i = 0; i < this.c.length; ++i) {
|
||||
this.c[i][0] = this.yaw;
|
||||
|
@ -64,7 +64,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
npc.update();
|
||||
NMSImpl.updateMinecraftAIState(npc, this);
|
||||
}
|
||||
if (npc != null && !npc.useMinecraftAI() && !isDeadOrDying()) {
|
||||
if (npc != null && !npc.useMinecraftAI()) {
|
||||
if (isDeadOrDying()) {
|
||||
setHealth(0F);
|
||||
return;
|
||||
}
|
||||
if (this.posPointer < 0) {
|
||||
for (int i = 0; i < this.positions.length; ++i) {
|
||||
this.positions[i][0] = this.getYRot();
|
||||
@ -214,7 +218,7 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
Vec3 old = getDeltaMovement();
|
||||
boolean res = super.reallyHurt(source, f);
|
||||
if (getPhaseManager().getCurrentPhase() == EnderDragonPhase.HOVERING) {
|
||||
if (getPhaseManager().getCurrentPhase().getPhase() == EnderDragonPhase.HOVERING) {
|
||||
setDeltaMovement(old);
|
||||
}
|
||||
return res;
|
||||
|
@ -66,7 +66,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
npc.update();
|
||||
NMSImpl.updateMinecraftAIState(npc, this);
|
||||
}
|
||||
if (npc != null && !npc.useMinecraftAI() && !isDeadOrDying()) {
|
||||
if (npc != null && !npc.useMinecraftAI()) {
|
||||
if (isDeadOrDying()) {
|
||||
setHealth(0F);
|
||||
return;
|
||||
}
|
||||
if (this.posPointer < 0) {
|
||||
for (int i = 0; i < this.positions.length; ++i) {
|
||||
this.positions[i][0] = this.getYRot();
|
||||
@ -216,7 +220,7 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
Vec3 old = getDeltaMovement();
|
||||
boolean res = super.reallyHurt(source, f);
|
||||
if (getPhaseManager().getCurrentPhase() == EnderDragonPhase.HOVERING) {
|
||||
if (getPhaseManager().getCurrentPhase().getPhase() == EnderDragonPhase.HOVERING) {
|
||||
setDeltaMovement(old);
|
||||
}
|
||||
return res;
|
||||
|
@ -67,7 +67,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
npc.update();
|
||||
|
||||
}
|
||||
if (npc != null && !npc.useMinecraftAI() && !isDeadOrDying()) {
|
||||
if (npc != null && !npc.useMinecraftAI()) {
|
||||
if (isDeadOrDying()) {
|
||||
setHealth(0F);
|
||||
return;
|
||||
}
|
||||
if (this.posPointer < 0) {
|
||||
for (int i = 0; i < this.positions.length; ++i) {
|
||||
this.positions[i][0] = this.getYRot();
|
||||
@ -218,7 +222,7 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
Vec3 old = getDeltaMovement();
|
||||
boolean res = super.reallyHurt(source, f);
|
||||
if (getPhaseManager().getCurrentPhase() == EnderDragonPhase.HOVERING) {
|
||||
if (getPhaseManager().getCurrentPhase().getPhase() == EnderDragonPhase.HOVERING) {
|
||||
setDeltaMovement(old);
|
||||
}
|
||||
return res;
|
||||
|
Loading…
Reference in New Issue
Block a user