diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-04-20 22:47:26 +0200 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-04-21 04:25:46 -0400 |
commit | a6c8a36dcea9c976d8b48f8b942608248db8cb4f (patch) | |
tree | 9b4039d8f0a9969abf5110a94d75925c4ad52524 /src/main/java/net/minecraft/server/EntityMonster.java | |
parent | 2fd3f8d299fdee827de90a999c5a4c9fd6eefeb9 (diff) | |
download | craftbukkit-a6c8a36dcea9c976d8b48f8b942608248db8cb4f.tar craftbukkit-a6c8a36dcea9c976d8b48f8b942608248db8cb4f.tar.gz craftbukkit-a6c8a36dcea9c976d8b48f8b942608248db8cb4f.tar.lz craftbukkit-a6c8a36dcea9c976d8b48f8b942608248db8cb4f.tar.xz craftbukkit-a6c8a36dcea9c976d8b48f8b942608248db8cb4f.zip |
Update for 1.5_02.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityMonster.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityMonster.java | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java index b464df95..bc8be4d2 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java @@ -20,18 +20,18 @@ public class EntityMonster extends EntityCreature implements IMonster { this.health = 20; } - public void r() { + public void u() { float f = this.c(1.0F); if (f > 0.5F) { - this.at += 2; + this.au += 2; } - super.r(); + super.u(); } - public void f_() { - super.f_(); + public void p_() { + super.p_(); if (this.world.spawnMonsters == 0) { this.die(); } @@ -106,15 +106,15 @@ public class EntityMonster extends EntityCreature implements IMonster { return 0.5F - this.world.l(i, j, k); } - public void a(NBTTagCompound nbttagcompound) { - super.a(nbttagcompound); - } - public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); } - public boolean b() { + public void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + } + + public boolean d() { int i = MathHelper.floor(this.locX); int j = MathHelper.floor(this.boundingBox.b); int k = MathHelper.floor(this.locZ); @@ -124,7 +124,15 @@ public class EntityMonster extends EntityCreature implements IMonster { } else { int l = this.world.getLightLevel(i, j, k); - return l <= this.random.nextInt(8) && super.b(); + if (this.world.u()) { + int i1 = this.world.f; + + this.world.f = 10; + l = this.world.getLightLevel(i, j, k); + this.world.f = i1; + } + + return l <= this.random.nextInt(8) && super.d(); } } } |