mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Item: Removed protected block field, items should now override getBlock()
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user