mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Move block registration to its own class
This commit is contained in:
@ -24,10 +24,11 @@ declare(strict_types=1);
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\block\BlockFactory;
|
||||
|
||||
class Carrot extends Food{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Block::CARROT_BLOCK);
|
||||
$this->block = BlockFactory::get(Block::CARROT_BLOCK);
|
||||
parent::__construct(self::CARROT, $meta, $count, "Carrot");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user