Update CraftBukkit to Minecraft 1.5.2

This commit is contained in:
Travis Watkins
2013-04-27 04:40:05 -05:00
parent 83c3aa188b
commit 799779e4b1
53 changed files with 317 additions and 268 deletions

View File

@@ -11,6 +11,7 @@ public class EntityEnderman extends EntityMonster {
private static boolean[] d = new boolean[256];
private int e = 0;
private int f = 0;
private boolean g;
public EntityEnderman(World world) {
super(world);
@@ -48,6 +49,7 @@ public class EntityEnderman extends EntityMonster {
if (entityhuman != null) {
if (this.e(entityhuman)) {
this.g = true;
if (this.f == 0) {
this.world.makeSound(entityhuman, "mob.endermen.stare", 1.0F, 1.0F);
}
@@ -133,12 +135,13 @@ public class EntityEnderman extends EntityMonster {
this.world.addParticle("portal", this.locX + (this.random.nextDouble() - 0.5D) * (double) this.width, this.locY + this.random.nextDouble() * (double) this.length - 0.25D, this.locZ + (this.random.nextDouble() - 0.5D) * (double) this.width, (this.random.nextDouble() - 0.5D) * 2.0D, -this.random.nextDouble(), (this.random.nextDouble() - 0.5D) * 2.0D);
}
if (this.world.u() && !this.world.isStatic) {
if (this.world.v() && !this.world.isStatic) {
float f = this.c(1.0F);
if (f > 0.5F && this.world.l(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
this.target = null;
this.a(false);
this.g = false;
this.m();
}
}
@@ -146,9 +149,14 @@ public class EntityEnderman extends EntityMonster {
if (this.F() || this.isBurning()) {
this.target = null;
this.a(false);
this.g = false;
this.m();
}
if (this.q() && !this.g && this.random.nextInt(100) == 0) {
this.a(false);
}
this.bG = false;
if (this.target != null) {
this.a(this.target, 100.0F, 100.0F);
@@ -319,7 +327,13 @@ public class EntityEnderman extends EntityMonster {
return false;
} else {
this.a(true);
if (damagesource instanceof EntityDamageSource && damagesource.getEntity() instanceof EntityHuman) {
this.g = true;
}
if (damagesource instanceof EntityDamageSourceIndirect) {
this.g = false;
for (int j = 0; j < 64; ++j) {
if (this.m()) {
return true;