| 
    PocketMine-MP 5.37.1 git-cef37e7835c666594588f957a47b27d521c6a58e
    
   | 
 
 Collaboration diagram for pocketmine\entity\HungerManager:Public Member Functions | |
| __construct (private Human $entity) | |
| addFood (float $amount) | |
| addSaturation (float $amount) | |
| exhaust (float $amount, int $cause=PlayerExhaustEvent::CAUSE_CUSTOM) | |
| getExhaustion () | |
| getFood () | |
| getFoodTickTimer () | |
| getMaxFood () | |
| getSaturation () | |
| isEnabled () | |
| isHungry () | |
| setEnabled (bool $enabled) | |
| setExhaustion (float $exhaustion) | |
| setFood (float $new) | |
| setFoodTickTimer (int $foodTickTimer) | |
| setSaturation (float $saturation) | |
| tick (int $tickDiff=1) | |
Definition at line 33 of file HungerManager.php.
| pocketmine\entity\HungerManager::__construct | ( | private Human | $entity | ) | 
Definition at line 43 of file HungerManager.php.
| pocketmine\entity\HungerManager::addFood | ( | float | $amount | ) | 
Definition at line 84 of file HungerManager.php.
| pocketmine\entity\HungerManager::addSaturation | ( | float | $amount | ) | 
Definition at line 112 of file HungerManager.php.
| pocketmine\entity\HungerManager::exhaust | ( | float | $amount, | 
| int | $cause = PlayerExhaustEvent::CAUSE_CUSTOM ) | 
Increases exhaustion level.
Definition at line 133 of file HungerManager.php.
| pocketmine\entity\HungerManager::getExhaustion | ( | ) | 
Definition at line 116 of file HungerManager.php.
| pocketmine\entity\HungerManager::getFood | ( | ) | 
Definition at line 57 of file HungerManager.php.
| pocketmine\entity\HungerManager::getFoodTickTimer | ( | ) | 
Definition at line 170 of file HungerManager.php.
| pocketmine\entity\HungerManager::getMaxFood | ( | ) | 
Definition at line 80 of file HungerManager.php.
| pocketmine\entity\HungerManager::getSaturation | ( | ) | 
Definition at line 98 of file HungerManager.php.
| pocketmine\entity\HungerManager::isEnabled | ( | ) | 
Definition at line 222 of file HungerManager.php.
| pocketmine\entity\HungerManager::isHungry | ( | ) | 
Returns whether the food level is below the maximum. This doesn't decide if the entity can eat food. Use Human::canEat() for that. 
Definition at line 94 of file HungerManager.php.
| pocketmine\entity\HungerManager::setEnabled | ( | bool | $enabled | ) | 
Definition at line 226 of file HungerManager.php.
| pocketmine\entity\HungerManager::setExhaustion | ( | float | $exhaustion | ) | 
WARNING: This method does not check if exhausted and does not consume saturation/food.
Definition at line 124 of file HungerManager.php.
| pocketmine\entity\HungerManager::setFood | ( | float | $new | ) | 
WARNING: This method does not check if full and may throw an exception if out of bounds.
InvalidArgumentException
Definition at line 67 of file HungerManager.php.
| pocketmine\entity\HungerManager::setFoodTickTimer | ( | int | $foodTickTimer | ) | 
Definition at line 174 of file HungerManager.php.
| pocketmine\entity\HungerManager::setSaturation | ( | float | $saturation | ) | 
WARNING: This method does not check if saturated and may throw an exception if out of bounds.
InvalidArgumentException
Definition at line 108 of file HungerManager.php.
| pocketmine\entity\HungerManager::tick | ( | int | $tickDiff = 1 | ) | 
Definition at line 181 of file HungerManager.php.