Added hunger and experience saving

This commit is contained in:
PEMapModder
2016-02-17 19:56:19 +08:00
parent e79976bdac
commit 5459576833
5 changed files with 116 additions and 15 deletions

View File

@ -33,7 +33,7 @@ abstract class Food extends Item implements FoodSource{
return true;
}
public function canBeConsumedBy(Entity $entity){
public function canBeConsumedBy(Entity $entity) : bool{
return $entity instanceof Human and $entity->getFood() < $entity->getMaxFood();
}