summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityCreature.java
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-05-26 13:48:22 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-05-26 13:48:22 +0100
commit6903f2024217f0959c015e76b23297af8e3b573f (patch)
tree690bf275ce19c655bd64eea05be231ed0c318fd6 /src/main/java/net/minecraft/server/EntityCreature.java
parentf463453d73249fe73cf3e23ed37e6cee870c8bf4 (diff)
downloadcraftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar
craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar.gz
craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar.lz
craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar.xz
craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.zip
Implemented 1.6!
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityCreature.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityCreature.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
index b08d6b6a..6c4f8969 100644
--- a/src/main/java/net/minecraft/server/EntityCreature.java
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
@@ -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;
}