Implemented 1.6!

This commit is contained in:
Dinnerbone
2011-05-26 13:48:22 +01:00
parent f463453d73
commit 6903f20242
76 changed files with 2699 additions and 2266 deletions

View File

@@ -47,7 +47,7 @@ public class EntityCreature extends EntityLiving {
if (this.target != null) {
this.pathEntity = this.world.findPath(this, this.target, f);
}
} else if (!this.target.P()) {
} else if (!this.target.Q()) {
// CraftBukkit start
EntityTargetEvent event = new EntityTargetEvent(this.getBukkitEntity(), null, TargetReason.TARGET_DIED);
CraftServer server = ((WorldServer) this.world).getServer();
@@ -66,6 +66,8 @@ public class EntityCreature extends EntityLiving {
if (this.e(this.target)) {
this.a(this.target, f1);
} else {
this.b(this.target, f1);
}
}
@@ -99,8 +101,8 @@ public class EntityCreature extends EntityLiving {
}
int l1 = MathHelper.floor(this.boundingBox.b + 0.5D);
boolean flag1 = this.Z();
boolean flag2 = this.aa();
boolean flag1 = this.aa();
boolean flag2 = this.ab();
this.pitch = 0.0F;
if (this.pathEntity != null && this.random.nextInt(100) != 0) {
@@ -117,7 +119,7 @@ public class EntityCreature extends EntityLiving {
}
}
this.ay = false;
this.aB = false;
if (vec3d != null) {
double d1 = vec3d.a - this.locX;
double d2 = vec3d.c - this.locZ;
@@ -126,7 +128,7 @@ public class EntityCreature extends EntityLiving {
float f4 = (float) (TrigMath.atan2(d2, d1) * 180.0D / 3.1415927410125732D) - 90.0F;
float f5 = f4 - this.yaw;
for (this.aw = this.aA; f5 < -180.0F; f5 += 360.0F) {
for (this.az = this.aD; f5 < -180.0F; f5 += 360.0F) {
;
}
@@ -150,12 +152,12 @@ public class EntityCreature extends EntityLiving {
this.yaw = (float) (Math.atan2(d5, d4) * 180.0D / 3.1415927410125732D) - 90.0F;
f5 = (f6 - this.yaw + 90.0F) * 3.1415927F / 180.0F;
this.av = -MathHelper.sin(f5) * this.aw * 1.0F;
this.aw = MathHelper.cos(f5) * this.aw * 1.0F;
this.ay = -MathHelper.sin(f5) * this.az * 1.0F;
this.az = MathHelper.cos(f5) * this.az * 1.0F;
}
if (d3 > 0.0D) {
this.ay = true;
this.aB = true;
}
}
@@ -164,11 +166,11 @@ public class EntityCreature extends EntityLiving {
}
if (this.positionChanged && !this.C()) {
this.ay = true;
this.aB = true;
}
if (this.random.nextFloat() < 0.8F && (flag1 || flag2)) {
this.ay = true;
this.aB = true;
}
} else {
super.c_();
@@ -178,6 +180,8 @@ public class EntityCreature extends EntityLiving {
protected void a(Entity entity, float f) {}
protected void b(Entity entity, float f) {}
protected float a(int i, int j, int k) {
return 0.0F;
}