mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
Human: don't hardcode max food
This commit is contained in:
parent
1f73c08762
commit
6111ce7df1
@ -641,7 +641,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
}
|
||||
|
||||
if($difficulty === Level::DIFFICULTY_PEACEFUL and $this->foodTickTimer % 10 === 0){
|
||||
if($food < 20){
|
||||
if($food < $this->getMaxFood()){
|
||||
$this->addFood(1.0);
|
||||
$food = $this->getFood();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user