meta = $meta; } public function getHardness() : float{ return 2; } public function getToolType() : int{ return Tool::TYPE_PICKAXE; } public function getName() : string{ static $names = [ 0 => "Stone", 1 => "Sandstone", 2 => "Wooden", 3 => "Cobblestone", 4 => "Brick", 5 => "Stone Brick", 6 => "Quartz", 7 => "Nether Brick" ]; return "Double " . $names[$this->meta & 0x07] . " Slab"; } public function getDrops(Item $item) : array{ if($item->isPickaxe() >= Tool::TIER_WOODEN){ return [ ItemFactory::get(Item::STONE_SLAB, $this->getDamage() & 0x07, 2) ]; } return []; } }