SPIGOT-1934: Expand EnderDragon API - implement dragon phases

By: Matthew <stteg@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot
2016-03-15 23:32:37 -04:00
parent c0cd5222ed
commit 15f22a7986
4 changed files with 142 additions and 0 deletions

View File

@@ -21,6 +21,15 @@
public EntityEnderDragon(World world) {
super(world);
@@ -169,7 +175,7 @@
Vec3D vec3d = idragoncontroller.g();
- if (vec3d != null) {
+ if (vec3d != null && idragoncontroller.i() != DragonControllerPhase.k) { // CraftBukkit - Don't move when hovering
d0 = vec3d.x - this.locX;
d1 = vec3d.y - this.locY;
d2 = vec3d.z - this.locZ;
@@ -308,7 +314,14 @@
if (this.currentEnderCrystal.dead) {
this.currentEnderCrystal = null;