PocketMine-MP 5.39.3 git-21ae710729750cd637333d673bbbbbc598fc659e
Loading...
Searching...
No Matches
pocketmine\item\FoodSourceItem Interface Reference
+ Inheritance diagram for pocketmine\item\FoodSourceItem:
+ Collaboration diagram for pocketmine\item\FoodSourceItem:

Public Member Functions

 canStartUsingItem (Player $player)
 
 getAdditionalEffects ()
 
 getFoodRestore ()
 
 getResidue ()
 
 getSaturationRestore ()
 
 onConsume (Living $consumer)
 
 requiresHunger ()
 

Detailed Description

Definition at line 28 of file FoodSourceItem.php.

Member Function Documentation

◆ canStartUsingItem()

pocketmine\item\Releasable::canStartUsingItem ( Player $player)
inherited

Returns whether the player can currently trigger the press-and-hold behaviour of the item. For example, bows return whether the player has an arrow that can be fired.

Implemented in pocketmine\item\Bow, pocketmine\item\Food, pocketmine\item\GoatHorn, pocketmine\item\Medicine, pocketmine\item\MilkBucket, pocketmine\item\Potion, pocketmine\item\Spyglass, and pocketmine\item\Trident.

◆ getAdditionalEffects()

◆ getResidue()

pocketmine\item\ConsumableItem::getResidue ( )
inherited

Returns the leftover that this Consumable produces when it is consumed. For Items, this is usually air, but could be an Item to add to a Player's inventory afterwards (such as a bowl).

Implemented in pocketmine\item\BeetrootSoup, pocketmine\item\Food, pocketmine\item\HoneyBottle, pocketmine\item\Medicine, pocketmine\item\MilkBucket, pocketmine\item\MushroomStew, pocketmine\item\Potion, pocketmine\item\RabbitStew, and pocketmine\item\SuspiciousStew.

◆ 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 ( )
inherited

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: