scoreboard players add quest1.shelfs_count temp 1
execute at @e[tag=quest1_shelf.spawnpoint,tag=!quest1_shelf.spawnpoint.spawned,sort=random,limit=1] rotated ~ ~ run function lbdm:quest1/shelf/summon
execute if score quest1.shelfs_count temp matches ..9 run function lbdm:quest1/shelf/arrange_all