setCount(mt_rand(0, 2)) ]; } public function isAffectedBySilkTouch() : bool{ return true; } public function getFlameEncouragement() : int{ return 60; } public function getFlammability() : int{ return 100; } private function canBeSupportedAt(Block $block) : bool{ $supportBlock = $block->getSide(Facing::DOWN); return $supportBlock->hasTypeTag(BlockTypeTags::SAND) || $supportBlock->hasTypeTag(BlockTypeTags::MUD) || match($supportBlock->getTypeId()){ //can't use DIRT tag here because it includes farmland BlockTypeIds::PODZOL, BlockTypeIds::MYCELIUM, BlockTypeIds::DIRT, BlockTypeIds::GRASS, BlockTypeIds::HARDENED_CLAY, BlockTypeIds::STAINED_CLAY => true, //TODO: moss block default => false, }; } }