mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 19:55:52 -07:00
Update CraftBukkit to Minecraft 1.4.4.
This commit is contained in:
@@ -11,15 +11,15 @@ public class EntityZombie extends EntityMonster {
|
||||
public EntityZombie(World world) {
|
||||
super(world);
|
||||
this.texture = "/mob/zombie.png";
|
||||
this.bI = 0.23F;
|
||||
this.bG = 0.23F;
|
||||
this.getNavigation().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.bI, false));
|
||||
this.goalSelector.a(3, new PathfinderGoalMeleeAttack(this, EntityVillager.class, this.bI, true));
|
||||
this.goalSelector.a(4, new PathfinderGoalMoveTowardsRestriction(this, this.bI));
|
||||
this.goalSelector.a(5, new PathfinderGoalMoveThroughVillage(this, this.bI, false));
|
||||
this.goalSelector.a(6, new PathfinderGoalRandomStroll(this, this.bI));
|
||||
this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, EntityHuman.class, this.bG, false));
|
||||
this.goalSelector.a(3, new PathfinderGoalMeleeAttack(this, EntityVillager.class, this.bG, true));
|
||||
this.goalSelector.a(4, new PathfinderGoalMoveTowardsRestriction(this, this.bG));
|
||||
this.goalSelector.a(5, new PathfinderGoalMoveThroughVillage(this, this.bG, false));
|
||||
this.goalSelector.a(6, new PathfinderGoalRandomStroll(this, this.bG));
|
||||
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));
|
||||
@@ -27,8 +27,8 @@ public class EntityZombie extends EntityMonster {
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, 16.0F, 0, false));
|
||||
}
|
||||
|
||||
public float by() {
|
||||
return super.by() * (this.isBaby() ? 1.5F : 1.0F);
|
||||
public float bB() {
|
||||
return super.bB() * (this.isBaby() ? 1.5F : 1.0F);
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
@@ -42,8 +42,8 @@ public class EntityZombie extends EntityMonster {
|
||||
return 20;
|
||||
}
|
||||
|
||||
public int aU() {
|
||||
int i = super.aU() + 2;
|
||||
public int aW() {
|
||||
int i = super.aW() + 2;
|
||||
|
||||
if (i > 20) {
|
||||
i = 20;
|
||||
@@ -52,7 +52,7 @@ public class EntityZombie extends EntityMonster {
|
||||
return i;
|
||||
}
|
||||
|
||||
protected boolean bb() {
|
||||
protected boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -73,10 +73,10 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
|
||||
public void c() {
|
||||
if (this.world.t() && !this.world.isStatic && !this.isBaby()) {
|
||||
if (this.world.u() && !this.world.isStatic && !this.isBaby()) {
|
||||
float f = this.c(1.0F);
|
||||
|
||||
if (f > 0.5F && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.world.j(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ))) {
|
||||
if (f > 0.5F && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.world.k(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ))) {
|
||||
boolean flag = true;
|
||||
ItemStack itemstack = this.getEquipment(4);
|
||||
|
||||
@@ -122,7 +122,7 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
|
||||
public int c(Entity entity) {
|
||||
ItemStack itemstack = this.bA();
|
||||
ItemStack itemstack = this.bD();
|
||||
int i = 4;
|
||||
|
||||
if (itemstack != null) {
|
||||
@@ -132,20 +132,20 @@ public class EntityZombie extends EntityMonster {
|
||||
return i;
|
||||
}
|
||||
|
||||
protected String aW() {
|
||||
protected String aY() {
|
||||
return "mob.zombie.say";
|
||||
}
|
||||
|
||||
protected String aX() {
|
||||
protected String aZ() {
|
||||
return "mob.zombie.hurt";
|
||||
}
|
||||
|
||||
protected String aY() {
|
||||
protected String ba() {
|
||||
return "mob.zombie.death";
|
||||
}
|
||||
|
||||
protected void a(int i, int j, int k, int l) {
|
||||
this.world.makeSound(this, "mob.zombie.step", 0.15F, 1.0F);
|
||||
this.makeSound("mob.zombie.step", 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
protected int getLootId() {
|
||||
@@ -171,8 +171,8 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
protected void bB() {
|
||||
super.bB();
|
||||
protected void bE() {
|
||||
super.bE();
|
||||
if (this.random.nextFloat() < (this.world.difficulty == 3 ? 0.05F : 0.01F)) {
|
||||
int i = this.random.nextInt(3);
|
||||
|
||||
@@ -221,9 +221,9 @@ public class EntityZombie extends EntityMonster {
|
||||
|
||||
EntityZombie entityzombie = new EntityZombie(this.world);
|
||||
|
||||
entityzombie.j(entityliving);
|
||||
entityzombie.k(entityliving);
|
||||
this.world.kill(entityliving);
|
||||
entityzombie.bD();
|
||||
entityzombie.bG();
|
||||
entityzombie.setVillager(true);
|
||||
if (entityliving.isBaby()) {
|
||||
entityzombie.setBaby(true);
|
||||
@@ -234,16 +234,16 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
public void bD() {
|
||||
public void bG() {
|
||||
this.canPickUpLoot = this.random.nextFloat() < as[this.world.difficulty];
|
||||
if (this.world.random.nextFloat() < 0.05F) {
|
||||
this.setVillager(true);
|
||||
}
|
||||
|
||||
this.bB();
|
||||
this.bC();
|
||||
this.bE();
|
||||
this.bF();
|
||||
if (this.getEquipment(4) == null) {
|
||||
Calendar calendar = this.world.S();
|
||||
Calendar calendar = this.world.T();
|
||||
|
||||
if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31 && this.random.nextFloat() < 0.25F) {
|
||||
this.setEquipment(4, new ItemStack(this.random.nextFloat() < 0.1F ? Block.JACK_O_LANTERN : Block.PUMPKIN));
|
||||
@@ -252,8 +252,8 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean c(EntityHuman entityhuman) {
|
||||
ItemStack itemstack = entityhuman.bP();
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
ItemStack itemstack = entityhuman.bT();
|
||||
|
||||
if (itemstack != null && itemstack.getItem() == Item.GOLDEN_APPLE && itemstack.getData() == 0 && this.isVillager() && this.hasEffect(MobEffectList.WEAKNESS)) {
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
@@ -289,8 +289,8 @@ public class EntityZombie extends EntityMonster {
|
||||
protected void p() {
|
||||
EntityVillager entityvillager = new EntityVillager(this.world);
|
||||
|
||||
entityvillager.j(this);
|
||||
entityvillager.bD();
|
||||
entityvillager.k(this);
|
||||
entityvillager.bG();
|
||||
entityvillager.q();
|
||||
if (this.isBaby()) {
|
||||
entityvillager.setAge(-24000);
|
||||
|
Reference in New Issue
Block a user