PocketMine-MP 5.23.3 git-fbaa125d0ce21ffef98fc1630881a92bedfbaa73
Loading...
Searching...
No Matches
pocketmine\item\ConsumableItem Interface Reference
+ Inheritance diagram for pocketmine\item\ConsumableItem:
+ Collaboration diagram for pocketmine\item\ConsumableItem:

Public Member Functions

 canStartUsingItem (Player $player)
 
 getAdditionalEffects ()
 
 getResidue ()
 
 onConsume (Living $consumer)
 

Detailed Description

Interface implemented by objects that can be consumed by mobs.

Definition at line 31 of file ConsumableItem.php.

Member Function Documentation

◆ getAdditionalEffects()

◆ getResidue()

pocketmine\item\ConsumableItem::getResidue ( )

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.


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