mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-09 16:42:03 -07:00
Update for 1.0.0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user