Implemented food and hunger

This commit is contained in:
PEMapModder
2016-02-10 22:49:48 +08:00
parent 1082e32fd7
commit 329a525ea1
47 changed files with 724 additions and 323 deletions

View File

@ -23,9 +23,17 @@ namespace pocketmine\item;
use pocketmine\block\Block;
class Potato extends Item{
class Potato extends Food{
public function __construct($meta = 0, $count = 1){
$this->block = Block::get(Item::POTATO_BLOCK);
parent::__construct(self::POTATO, 0, $count, "Potato");
}
public function getFoodRestore() : int{
return 1;
}
public function getSaturationRestore() : float{
return 0.6;
}
}