Update for 1.0.0

This commit is contained in:
Erik Broes
2011-11-20 00:01:14 -08:00
committed by Erik Broes
parent 589f66bd1b
commit 345ea36c7b
153 changed files with 6128 additions and 4617 deletions

View File

@@ -19,12 +19,15 @@ public class EntityChicken extends EntityAnimal {
super(world);
this.texture = "/mob/chicken.png";
this.b(0.3F, 0.7F);
this.health = 4;
this.j = this.random.nextInt(6000) + 6000;
}
public void s() {
super.s();
public int getMaxHealth() {
return 4;
}
public void d() {
super.d();
this.h = this.b;
this.g = this.c;
this.c = (float) ((double) this.c + (double) (this.onGround ? -1 : 4) * 0.3D);
@@ -46,14 +49,14 @@ public class EntityChicken extends EntityAnimal {
}
this.b += this.i * 2.0F;
if (!this.world.isStatic && --this.j <= 0) {
if (!this.l() && !this.world.isStatic && --this.j <= 0) {
this.world.makeSound(this, "mob.chickenplop", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
this.b(Item.EGG.id, 1);
this.j = this.random.nextInt(6000) + 6000;
}
}
protected void a(float f) {}
protected void b(float f) {}
public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound);
@@ -63,33 +66,42 @@ public class EntityChicken extends EntityAnimal {
super.a(nbttagcompound);
}
protected String h() {
protected String c_() {
return "mob.chicken";
}
protected String i() {
protected String m() {
return "mob.chickenhurt";
}
protected String j() {
protected String n() {
return "mob.chickenhurt";
}
protected int k() {
protected int e() {
return Item.FEATHER.id;
}
protected void a(boolean flag) {
protected void a(boolean flag, int i) {
// CraftBukkit start - whole method
List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>();
int count = this.random.nextInt(3);
int j = this.random.nextInt(3) + this.random.nextInt(1 + i);
if (count > 0) {
loot.add(new org.bukkit.inventory.ItemStack(Item.FEATHER.id, count));
loot.add(new org.bukkit.inventory.ItemStack(this.fireTicks > 0 ? Item.COOKED_CHICKEN.id : Item.RAW_CHICKEN.id, 1));
if (j > 0) {
loot.add(new org.bukkit.inventory.ItemStack(Item.FEATHER.id, j));
}
if (this.z()) {
this.b(Item.COOKED_CHICKEN.id, 1);
} else {
this.b(Item.RAW_CHICKEN.id, 1);
}
CraftEventFactory.callEntityDeathEvent(this, loot);
// CraftBukkit end
}
protected EntityAnimal createChild(EntityAnimal entityanimal) {
return new EntityChicken(this.world);
}
}