Skip to content

FoodSource ​

interface · pocketmine\entity\FoodSource · source

Extends Consumable

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

Methods ​

getFoodRestore() ​

php
public function getFoodRestore() : int

getSaturationRestore() ​

php
public function getSaturationRestore() : float

requiresHunger() ​

php
public function requiresHunger() : bool

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

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.