diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/EntitySpider.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntitySpider.java | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntitySpider.java b/src/main/java/net/minecraft/server/EntitySpider.java new file mode 100644 index 00000000..b1a060d4 --- /dev/null +++ b/src/main/java/net/minecraft/server/EntitySpider.java @@ -0,0 +1,79 @@ +package net.minecraft.server; + +import java.util.Random; + +public class EntitySpider extends EntityMobs { + + public EntitySpider(World world) { + super(world); + aP = "/mob/spider.png"; + a(1.4F, 0.9F); + bC = 0.8F; + } + + public double k() { + return (double) J * 0.75D - 0.5D; + } + + protected Entity l() { + float f1 = b(1.0F); + + if (f1 < 0.5F) { + double d = 16D; + + return ((Entity) (l.a(((Entity) (this)), d))); + } else { + return null; + } + } + + protected String e() { + return "mob.spider"; + } + + protected String f() { + return "mob.spider"; + } + + protected String g() { + return "mob.spiderdeath"; + } + + protected void a(Entity entity, float f1) { + float f2 = b(1.0F); + + if (f2 > 0.5F && W.nextInt(100) == 0) { + this.d = null; + return; + } + if (f1 > 2.0F && f1 < 6F && W.nextInt(10) == 0) { + if (A) { + double d = entity.p - p; + double d1 = entity.r - r; + float f3 = MathHelper.a(d * d + d1 * d1); + + s = (d / (double) f3) * 0.5D * 0.80000001192092896D + s * 0.20000000298023224D; + u = (d1 / (double) f3) * 0.5D * 0.80000001192092896D + u * 0.20000000298023224D; + t = 0.40000000596046448D; + } + } else { + super.a(entity, f1); + } + } + + public void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + } + + public void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + } + + protected int h() { + return Item.I.ba; + } + + public boolean m() { + return B; + } +} |