Item: Removed protected block field, items should now override getBlock()

This commit is contained in:
Dylan K. Taylor
2018-02-15 18:44:25 +00:00
parent 2cabdca3f7
commit 88a05845c2
13 changed files with 50 additions and 37 deletions

View File

@ -28,10 +28,13 @@ use pocketmine\block\BlockFactory;
class Potato extends Food{
public function __construct(int $meta = 0){
$this->block = BlockFactory::get(Block::POTATO_BLOCK);
parent::__construct(self::POTATO, $meta, "Potato");
}
public function getBlock() : Block{
return BlockFactory::get(Block::POTATO_BLOCK);
}
public function getFoodRestore() : int{
return 1;
}