meta = $meta; } public function canBeReplaced(){ return true; } public function getName(){ static $names = [ 0 => "Sunflower", 1 => "Lilac", 2 => "Double Tallgrass", 3 => "Large Fern", 4 => "Rose Bush", 5 => "Peony" ]; return $names[$this->meta & 0x07]; } public function onUpdate($type){ if($type === Level::BLOCK_UPDATE_NORMAL){ if($this->getSide(0)->isTransparent() === true){ //Replace with common break method $this->getLevel()->setBlock($this, new Air(), true, true); return Level::BLOCK_UPDATE_NORMAL; } } return false; } public function getDrops(Item $item){ //TODO return []; } }