summaryrefslogtreecommitdiffstats
path: root/nms-patches/FoodMetaData.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/FoodMetaData.patch')
-rw-r--r--nms-patches/FoodMetaData.patch7
1 files changed, 4 insertions, 3 deletions
diff --git a/nms-patches/FoodMetaData.patch b/nms-patches/FoodMetaData.patch
index aaeab266..657ac7fa 100644
--- a/nms-patches/FoodMetaData.patch
+++ b/nms-patches/FoodMetaData.patch
@@ -38,7 +38,7 @@
}
public void a(EntityHuman entityhuman) {
-@@ -28,14 +46,23 @@
+@@ -28,7 +46,15 @@
if (this.saturationLevel > 0.0F) {
this.saturationLevel = Math.max(this.saturationLevel - 1.0F, 0.0F);
} else if (enumdifficulty != EnumDifficulty.PEACEFUL) {
@@ -55,12 +55,13 @@
}
}
- if (entityhuman.world.getGameRules().getBoolean("naturalRegeneration") && this.foodLevel >= 18 && entityhuman.cm()) {
+@@ -46,7 +72,8 @@
+ } 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);
- this.a(3.0F);
+ this.a(4.0F);
this.foodTickTimer = 0;
}