Updated CraftBukkit to 1.2

This commit is contained in:
Nathan Adams
2012-03-01 10:49:23 +00:00
parent e9ca87000c
commit 543c4879fe
143 changed files with 3710 additions and 4433 deletions

View File

@@ -7,30 +7,38 @@ public class EntityZombie extends EntityMonster {
public EntityZombie(World world) {
super(world);
this.texture = "/mob/zombie.png";
this.bb = 0.5F;
this.bb = 0.23F;
this.damage = 4;
this.goalSelector.a(1, new PathfinderGoalFloat(this));
this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, world, 16.0F));
this.goalSelector.a(3, new PathfinderGoalRandomStroll(this));
this.goalSelector.a(4, new PathfinderGoalLookAtPlayer(this, world, 8.0F));
this.goalSelector.a(4, new PathfinderGoalRandomLookaround(this));
this.ak().b(true);
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new PathfinderGoalBreakDoor(this));
this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, EntityHuman.class, this.bb, false));
this.goalSelector.a(3, new PathfinderGoalMeleeAttack(this, EntityVillager.class, this.bb, true));
this.goalSelector.a(4, new PathfinderGoalMoveTowardsRestriction(this, this.bb));
this.goalSelector.a(5, new PathfinderGoalMoveThroughVillage(this, this.bb, false));
this.goalSelector.a(6, new PathfinderGoalRandomStroll(this, this.bb));
this.goalSelector.a(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, false));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 16.0F, 0, true));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, 16.0F, 0, false));
}
public int getMaxHealth() {
return 20;
}
public int P() {
public int S() {
return 2;
}
protected boolean as() {
return false;
protected boolean c_() {
return true;
}
public void d() {
public void e() {
if (this.world.e() && !this.world.isStatic) {
float f = this.a(1.0F);
float f = this.b(1.0F);
if (f > 0.5F && this.world.isChunkLoaded(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
// CraftBukkit start
@@ -44,18 +52,18 @@ public class EntityZombie extends EntityMonster {
}
}
super.d();
super.e();
}
protected String c_() {
protected String i() {
return "mob.zombie";
}
protected String m() {
protected String j() {
return "mob.zombiehurt";
}
protected String n() {
protected String k() {
return "mob.zombiedeath";
}
@@ -66,4 +74,23 @@ public class EntityZombie extends EntityMonster {
public MonsterType getMonsterType() {
return MonsterType.UNDEAD;
}
protected void b(int i) {
switch (this.random.nextInt(4)) {
case 0:
this.b(Item.IRON_SWORD.id, 1);
break;
case 1:
this.b(Item.IRON_HELMET.id, 1);
break;
case 2:
this.b(Item.IRON_INGOT.id, 1);
break;
case 3:
this.b(Item.IRON_SPADE.id, 1);
}
}
}