PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\entity\FoodSource Interface Reference
+ Inheritance diagram for pocketmine\entity\FoodSource:
+ Collaboration diagram for pocketmine\entity\FoodSource:

Public Member Functions

 getAdditionalEffects ()
 
 getFoodRestore ()
 
 getSaturationRestore ()
 
 onConsume (Living $consumer)
 
 requiresHunger ()
 

Detailed Description

Interface implemented by objects that can be consumed by players, giving them food and saturation.

Definition at line 29 of file FoodSource.php.

Member Function Documentation

◆ getAdditionalEffects()

◆ onConsume()

pocketmine\entity\Consumable::onConsume ( Living $consumer)
inherited

Called when this Consumable is consumed by mob, after standard resulting effects have been applied.

Implemented in pocketmine\block\BaseCake, pocketmine\block\CakeWithCandle, pocketmine\item\ChorusFruit, pocketmine\item\Food, pocketmine\item\HoneyBottle, pocketmine\item\Medicine, pocketmine\item\MilkBucket, and pocketmine\item\Potion.

◆ requiresHunger()

pocketmine\entity\FoodSource::requiresHunger ( )

Returns whether a Human eating this FoodSource must have a non-full hunger bar. This is ignored in creative mode and in peaceful difficulty.

Implemented in pocketmine\block\BaseCake, pocketmine\item\ChorusFruit, pocketmine\item\Food, pocketmine\item\GoldenApple, pocketmine\item\HoneyBottle, and pocketmine\item\SuspiciousStew.


The documentation for this interface was generated from the following file: