meta = $meta; } public function getName() : string{ return "Rail"; } public function getHardness() : float{ return 0.7; } public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $facePos, Player $player = null) : bool{ if(!$blockReplace->getSide(Vector3::SIDE_DOWN)->isTransparent()){ return $this->getLevel()->setBlock($blockReplace, $this, true, true); } return false; } public function onUpdate(int $type){ if($type === Level::BLOCK_UPDATE_NORMAL){ if($this->getSide(Vector3::SIDE_DOWN)->isTransparent()){ $this->getLevel()->useBreakOn($this); return $type; }else{ //TODO: Update rail connectivity } } return false; } public function getVariantBitmask() : int{ return 0; } }