diff --git a/src/pocketmine/entity/Human.php b/src/pocketmine/entity/Human.php index 572a15642..3a06acd92 100644 --- a/src/pocketmine/entity/Human.php +++ b/src/pocketmine/entity/Human.php @@ -643,6 +643,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{ if($difficulty === Level::DIFFICULTY_PEACEFUL and $this->foodTickTimer % 10 === 0){ if($food < 20){ $this->addFood(1.0); + $food = $this->getFood(); } if($this->foodTickTimer % 20 === 0 and $health < $this->getMaxHealth()){ $this->heal(new EntityRegainHealthEvent($this, 1, EntityRegainHealthEvent::CAUSE_SATURATION));