diff options
author | Andrew Ardill <andrew.ardill@gmail.com> | 2011-01-17 11:03:19 +0800 |
---|---|---|
committer | Dinner Bone <dinnerbone@dinnerbone.com> | 2011-01-18 00:13:32 +0800 |
commit | 5209e17e1bd0e0803035c697c1ec10c49831dfdb (patch) | |
tree | 849b2a1cae93687c886a0f55d63b0e93fb636cea /src/main/java/net/minecraft/server/EntityChicken.java | |
parent | 5f2c8108b776ab5710adfe597574fb0b7e929e36 (diff) | |
download | craftbukkit-5209e17e1bd0e0803035c697c1ec10c49831dfdb.tar craftbukkit-5209e17e1bd0e0803035c697c1ec10c49831dfdb.tar.gz craftbukkit-5209e17e1bd0e0803035c697c1ec10c49831dfdb.tar.lz craftbukkit-5209e17e1bd0e0803035c697c1ec10c49831dfdb.tar.xz craftbukkit-5209e17e1bd0e0803035c697c1ec10c49831dfdb.zip |
Adding all Entities into CraftBukkit.
These are needed to properly allow for determining class type, in
accordance with current practice.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityChicken.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityChicken.java | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java new file mode 100644 index 00000000..6663ce90 --- /dev/null +++ b/src/main/java/net/minecraft/server/EntityChicken.java @@ -0,0 +1,78 @@ +package net.minecraft.server; + +import java.util.Random; + +public class EntityChicken extends EntityAnimals { + + public boolean a; + public float b; + public float c; + public float f; + public float ak; + public float al; + public int am; + + public EntityChicken(World world) { + super(world); + a = false; + b = 0.0F; + c = 0.0F; + al = 1.0F; + aP = "/mob/chicken.png"; + a(0.3F, 0.4F); + aZ = 4; + am = W.nextInt(6000) + 6000; + } + + public void o() { + super.o(); + ak = b; + f = c; + c += ((float) ((double) (A ? -1 : 4) * 0.29999999999999999D)); + if (c < 0.0F) { + c = 0.0F; + } + if (c > 1.0F) { + c = 1.0F; + } + if (!A && al < 1.0F) { + al = 1.0F; + } + al *= 0.90000000000000002D; + if (!A && t < 0.0D) { + t *= 0.59999999999999998D; + } + b += al * 2.0F; + if (!l.z && --am <= 0) { + l.a(((Entity) (this)), "mob.chickenplop", 1.0F, (W.nextFloat() - W.nextFloat()) * 0.2F + 1.0F); + a(Item.aN.ba, 1); + am = W.nextInt(6000) + 6000; + } + } + + protected void a(float f1) {} + + public void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + } + + public void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + } + + protected String e() { + return "mob.chicken"; + } + + protected String f() { + return "mob.chickenhurt"; + } + + protected String g() { + return "mob.chickenhurt"; + } + + protected int h() { + return Item.J.ba; + } +} |