Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package net.minecraft.server;
2
3public class EntityChicken extends EntityAnimal {
4
5 public boolean a = false;
6 public float b = 0.0F;
7 public float c = 0.0F;
8 public float f;
9 public float g;
10 public float h = 1.0F;
11 public int i;
12
13 public EntityChicken(World world) {
14 super(world);
15 this.texture = "/mob/chicken.png";
16 this.b(0.3F, 0.4F);
17 this.health = 4;
18 this.i = this.random.nextInt(6000) + 6000;
19 }
20
21 public void v() {
22 super.v();
23 this.g = this.b;
24 this.f = this.c;
25 this.c = (float) ((double) this.c + (double) (this.onGround ? -1 : 4) * 0.3D);
26 if (this.c < 0.0F) {
27 this.c = 0.0F;
28 }
29
30 if (this.c > 1.0F) {
31 this.c = 1.0F;
32 }
33
34 if (!this.onGround && this.h < 1.0F) {
35 this.h = 1.0F;
36 }
37
38 this.h = (float) ((double) this.h * 0.9D);
39 if (!this.onGround && this.motY < 0.0D) {
40 this.motY *= 0.6D;
41 }
42
43 this.b += this.h * 2.0F;
44 if (!this.world.isStatic && --this.i <= 0) {
45 this.world.makeSound(this, "mob.chickenplop", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
46 this.b(Item.EGG.id, 1);
47 this.i = this.random.nextInt(6000) + 6000;
48 }
49 }
50
51 protected void a(float f) {
52 }
53
54 public void b(NBTTagCompound nbttagcompound) {
55 super.b(nbttagcompound);
56 }
57
58 public void a(NBTTagCompound nbttagcompound) {
59 super.a(nbttagcompound);
60 }
61
62 protected String g() {
63 return "mob.chicken";
64 }
65
66 protected String h() {
67 return "mob.chickenhurt";
68 }
69
70 protected String i() {
71 return "mob.chickenhurt";
72 }
73
74 protected int j() {
75 return Item.FEATHER.id;
76 }
77}