###Checks for the time of day and adds requisite scores at noon###
scoreboard players add @s[tag=nitEndstoneer] nitResourceSpawn 1
scoreboard players add @s[tag=nitChorister] nitResourceSpawn 1
scoreboard players add @s[tag=nitShroomer] nitResourceSpawn 1

###Performs item distribution###
execute if entity @s[scores={nitResourceSpawn=1..},tag=nitEndstoneer] at @e[tag=nitEndstoneStor,limit=1,sort=nearest] run summon minecraft:item ~ ~1 ~ {Item:{id:"minecraft:end_stone",Count:12b}}
execute if entity @s[scores={nitResourceSpawn=1..},tag=nitChorister] at @e[tag=nitChorusStor,limit=1,sort=nearest] run summon minecraft:item ~ ~1 ~ {Item:{id:"minecraft:popped_chorus_fruit",Count:12b}}
execute if entity @s[scores={nitResourceSpawn=1..},tag=nitShroomer] at @e[tag=nitChorusStor,limit=1,sort=nearest] run summon minecraft:item ~ ~1 ~ {Item:{id:"minecraft:popped_chorus_fruit",Count:14b}}

###Decrements scores###
scoreboard players remove @s[scores={nitResourceSpawn=1..},tag=nitEndstoneer] nitResourceSpawn 1
scoreboard players remove @s[scores={nitResourceSpawn=1..},tag=nitChorister] nitResourceSpawn 1
scoreboard players remove @s[scores={nitResourceSpawn=1..},tag=nitShroomer] nitResourceSpawn 1