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 Tool::TYPE_PICKAXE; } public function onBreak(Item $item, Player $player = null) : bool{ return $this->getLevel()->setBlock($this, BlockFactory::get(Block::WATER), true); } public function ticksRandomly() : bool{ return true; } public function onUpdate(int $type){ if($type === Level::BLOCK_UPDATE_RANDOM){ if($this->level->getHighestAdjacentBlockLight($this->x, $this->y, $this->z) >= 12){ $this->level->useBreakOn($this); return $type; } } return false; } public function getDrops(Item $item) : array{ return []; } }