Allow eating in creative & peaceful

closes #5923
closes #6056
This commit is contained in:
Dylan K. Taylor
2024-12-01 17:42:26 +00:00
parent 93a9007f3c
commit 12214792b3
5 changed files with 18 additions and 3 deletions

View File

@ -44,6 +44,6 @@ abstract class Food extends Item implements FoodSourceItem{
}
public function canStartUsingItem(Player $player) : bool{
return !$this->requiresHunger() || $player->getHungerManager()->isHungry();
return !$this->requiresHunger() || $player->canEat();
}
}