meta = $meta; } public function getName() : string{ static $names = [ self::TYPE_POPPY => "Poppy", self::TYPE_BLUE_ORCHID => "Blue Orchid", self::TYPE_ALLIUM => "Allium", self::TYPE_AZURE_BLUET => "Azure Bluet", self::TYPE_RED_TULIP => "Red Tulip", self::TYPE_ORANGE_TULIP => "Orange Tulip", self::TYPE_WHITE_TULIP => "White Tulip", self::TYPE_PINK_TULIP => "Pink Tulip", self::TYPE_OXEYE_DAISY => "Oxeye Daisy" ]; return $names[$this->getVariant()] ?? "Unknown"; } public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{ $down = $this->getSide(Vector3::SIDE_DOWN); if($down->getId() === Block::GRASS or $down->getId() === Block::DIRT or $down->getId() === Block::FARMLAND){ $this->getLevelNonNull()->setBlock($blockReplace, $this, true); return true; } return false; } public function onNearbyBlockChange() : void{ if($this->getSide(Vector3::SIDE_DOWN)->isTransparent()){ $this->getLevelNonNull()->useBreakOn($this); } } public function getFlameEncouragement() : int{ return 60; } public function getFlammability() : int{ return 100; } }