summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2011-09-20 16:31:43 -0400
committerEvilSeph <evilseph@gmail.com>2011-09-20 23:44:43 -0400
commit0a52c7f3346833fd568e020d3f1b918b792b09f4 (patch)
treea0905a7e922c6c4c9149045f339281025805213b
parente4d58faf5bb89bb4dd89d713e31431688c760e83 (diff)
downloadcraftbukkit-0a52c7f3346833fd568e020d3f1b918b792b09f4.tar
craftbukkit-0a52c7f3346833fd568e020d3f1b918b792b09f4.tar.gz
craftbukkit-0a52c7f3346833fd568e020d3f1b918b792b09f4.tar.lz
craftbukkit-0a52c7f3346833fd568e020d3f1b918b792b09f4.tar.xz
craftbukkit-0a52c7f3346833fd568e020d3f1b918b792b09f4.zip
Made health regeneration only occur if difficulty is set to 0 (Peaceful).
-rw-r--r--src/main/java/net/minecraft/server/EntityHuman.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index dd6f612f..eafc83b2 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -291,8 +291,8 @@ public abstract class EntityHuman extends EntityLiving {
--this.n;
}
- // CraftBukkit - spawnMonsters -> allowMonsters
- if (!this.world.allowMonsters && this.health < 20 && this.ticksLived % 20 * 12 == 0) {
+ if (this.world.spawnMonsters == 0 && this.health < 20 && this.ticksLived % 20 * 12 == 0) {
+ // CraftBukkit - added regain reason of "REGEN" for filtering purposes.
this.c(1, RegainReason.REGEN);
}