mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +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 WheatSeeds extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Block::WHEAT_BLOCK);
|
||||
$this->block = BlockFactory::get(Block::WHEAT_BLOCK);
|
||||
parent::__construct(self::WHEAT_SEEDS, $meta, $count, "Wheat Seeds");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user