summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2011-09-22 01:36:31 -0400
committerEvilSeph <evilseph@gmail.com>2011-09-22 01:36:31 -0400
commita7717d4d795f028d331f24138dd0935c03910edd (patch)
treec12285a64fe58bd4e8fffe0becfe12c1c03cbff5
parentaa0739d90a534cb8072c1432250aecfdf228e9f6 (diff)
downloadcraftbukkit-a7717d4d795f028d331f24138dd0935c03910edd.tar
craftbukkit-a7717d4d795f028d331f24138dd0935c03910edd.tar.gz
craftbukkit-a7717d4d795f028d331f24138dd0935c03910edd.tar.lz
craftbukkit-a7717d4d795f028d331f24138dd0935c03910edd.tar.xz
craftbukkit-a7717d4d795f028d331f24138dd0935c03910edd.zip
Added RegainReason.SATIATED.
This reason is used when a player regains health from generating due to their hunger being satisfied.
-rw-r--r--src/main/java/net/minecraft/server/FoodMetaData.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java
index fe78d4ea..768e42d7 100644
--- a/src/main/java/net/minecraft/server/FoodMetaData.java
+++ b/src/main/java/net/minecraft/server/FoodMetaData.java
@@ -49,7 +49,8 @@ public class FoodMetaData {
if (this.foodLevel >= 18 && entityhuman.W()) {
++this.foodTickTimer;
if (this.foodTickTimer >= 80) {
- entityhuman.c(1);
+ // CraftBukkit - added RegainReason.
+ entityhuman.c(1, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED);
this.foodTickTimer = 0;
}
} else if (this.foodLevel <= 0) {