meta = $meta; } public function getName() : string{ return "Ice"; } public function getHardness() : float{ return 0.5; } public function getLightFilter() : int{ return 2; } public function getFrictionFactor() : float{ return 0.98; } public function getToolType() : int{ return BlockToolType::TYPE_PICKAXE; } public function onBreak(Item $item, Player $player = null) : bool{ if(!$item->hasEnchantment(Enchantment::SILK_TOUCH)){ return $this->getLevel()->setBlock($this, BlockFactory::get(Block::WATER), true); } return parent::onBreak($item, $player); } public function ticksRandomly() : bool{ return true; } public function onRandomTick() : void{ if($this->level->getHighestAdjacentBlockLight($this->x, $this->y, $this->z) >= 12){ $this->level->useBreakOn($this); } } public function getDropsForCompatibleTool(Item $item) : array{ return []; } }