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,7 +28,10 @@ use pocketmine\block\BlockFactory;
class WheatSeeds extends Item{
public function __construct(int $meta = 0){
$this->block = BlockFactory::get(Block::WHEAT_BLOCK);
parent::__construct(self::WHEAT_SEEDS, $meta, "Wheat Seeds");
}
public function getBlock() : Block{
return BlockFactory::get(Block::WHEAT_BLOCK);
}
}