@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user