diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-11-20 00:01:14 -0800 |
---|---|---|
committer | Erik Broes <erikbroes@ripe.net> | 2011-11-20 00:01:33 -0800 |
commit | 345ea36c7bb3383c6e4825355d0043a646194eaa (patch) | |
tree | df116b57d92315c0a13c2fdc87d792b031c7239a /src/main/java/net/minecraft/server/EntitySpider.java | |
parent | 589f66bd1b766dc1fdd737ee885304196a2ed86a (diff) | |
download | craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.gz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.lz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.xz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.zip |
Update for 1.0.0
Diffstat (limited to 'src/main/java/net/minecraft/server/EntitySpider.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntitySpider.java | 77 |
1 files changed, 64 insertions, 13 deletions
diff --git a/src/main/java/net/minecraft/server/EntitySpider.java b/src/main/java/net/minecraft/server/EntitySpider.java index 1bccda26..bc724ec7 100644 --- a/src/main/java/net/minecraft/server/EntitySpider.java +++ b/src/main/java/net/minecraft/server/EntitySpider.java @@ -11,43 +11,63 @@ public class EntitySpider extends EntityMonster { super(world); this.texture = "/mob/spider.png"; this.b(1.4F, 0.9F); - this.aU = 0.8F; + this.aY = 0.8F; } - public double n() { + protected void b() { + super.b(); + this.datawatcher.a(16, new Byte((byte) 0)); + } + + public void d() { + super.d(); + } + + public void w_() { + super.w_(); + if (!this.world.isStatic) { + this.a(this.positionChanged); + } + } + + public int getMaxHealth() { + return 16; + } + + public double q() { return (double) this.width * 0.75D - 0.5D; } - protected boolean e_() { + protected boolean g_() { return false; } protected Entity findTarget() { - float f = this.a_(1.0F); + float f = this.a(1.0F); if (f < 0.5F) { double d0 = 16.0D; - return this.world.findNearbyPlayer(this, d0); + return this.world.b(this, d0); } else { return null; } } - protected String h() { + protected String c_() { return "mob.spider"; } - protected String i() { + protected String m() { return "mob.spider"; } - protected String j() { + protected String n() { return "mob.spiderdeath"; } protected void a(Entity entity, float f) { - float f1 = this.a_(1.0F); + float f1 = this.a(1.0F); if (f1 > 0.5F && this.random.nextInt(100) == 0) { // CraftBukkit start @@ -88,13 +108,44 @@ public class EntitySpider extends EntityMonster { super.a(nbttagcompound); } - protected int k() { + protected int e() { return Item.STRING.id; } - public boolean p() { - return this.positionChanged; + protected void a(boolean flag, int i) { + super.a(flag, i); + if (flag && (this.random.nextInt(3) == 0 || this.random.nextInt(1 + i) > 0)) { + this.b(Item.SPIDER_EYE.id, 1); + } + } + + public boolean r() { + return this.o_(); } - public void q() {} + public void s() {} + + public EnchantmentDamage t() { + return EnchantmentDamage.c; + } + + public boolean a(MobEffect mobeffect) { + return mobeffect.getEffectId() == MobEffectList.POISON.id ? false : super.a(mobeffect); + } + + public boolean o_() { + return (this.datawatcher.getByte(16) & 1) != 0; + } + + public void a(boolean flag) { + byte b0 = this.datawatcher.getByte(16); + + if (flag) { + b0 = (byte) (b0 | 1); + } else { + b0 &= -2; + } + + this.datawatcher.watch(16, Byte.valueOf(b0)); + } } |