diff options
author | md_5 <git@md-5.net> | 2016-03-12 11:12:38 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-12 11:12:38 +1100 |
commit | 75286088fe01abc77edb96b5c240f9de6da86c7c (patch) | |
tree | d18aa16b8c256023b37d94be9124e10108ba0303 | |
parent | 1fefbf9b988be4173df80888d1928418243efec8 (diff) | |
download | craftbukkit-75286088fe01abc77edb96b5c240f9de6da86c7c.tar craftbukkit-75286088fe01abc77edb96b5c240f9de6da86c7c.tar.gz craftbukkit-75286088fe01abc77edb96b5c240f9de6da86c7c.tar.lz craftbukkit-75286088fe01abc77edb96b5c240f9de6da86c7c.tar.xz craftbukkit-75286088fe01abc77edb96b5c240f9de6da86c7c.zip |
SPIGOT-1893: Wrong RegainReason for eating.
-rw-r--r-- | nms-patches/FoodMetaData.patch | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/nms-patches/FoodMetaData.patch b/nms-patches/FoodMetaData.patch index 657ac7fa..60b398c7 100644 --- a/nms-patches/FoodMetaData.patch +++ b/nms-patches/FoodMetaData.patch @@ -55,13 +55,20 @@ } } -@@ -46,7 +72,8 @@ +@@ -39,14 +65,14 @@ + if (this.foodTickTimer >= 10) { + float f = Math.min(this.saturationLevel, 4.0F); + +- entityhuman.heal(f / 4.0F); ++ entityhuman.heal(f / 4.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason + this.a(f); + this.foodTickTimer = 0; + } } else if (flag && this.foodLevel >= 18 && entityhuman.cT()) { ++this.foodTickTimer; if (this.foodTickTimer >= 80) { - entityhuman.heal(1.0F); -+ // CraftBukkit - added RegainReason -+ entityhuman.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); ++ entityhuman.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason this.a(4.0F); this.foodTickTimer = 0; } |