item replace entity @e[tag=chef.display] container.0 from entity @e[tag=chef.next,limit=1] container.0
scoreboard players operation @e[tag=chef.display,limit=1] chef.random = @e[tag=chef.next,limit=1] chef.random
execute as @e[tag=chef.next] run function ws:work/misc/chef/define
execute at @e[tag=chef.display] run playsound minecraft:entity.experience_orb.pickup player @a[distance=..15] ~ ~ ~ 1 0.7

execute if score .chef chef.rating matches 0..1 run scoreboard players set .chef chef.time 909
execute if score .chef chef.rating matches 2..3 run scoreboard players set .chef chef.time 909
execute if score .chef chef.rating matches 4..5 run scoreboard players set .chef chef.time 859
execute if score .chef chef.rating matches 6..7 run scoreboard players set .chef chef.time 809
execute if score .chef chef.rating matches 8..9 run scoreboard players set .chef chef.time 759
execute if score .chef chef.rating matches 10 run scoreboard players set .chef chef.time 709

execute unless entity @s[type=minecraft:player] if score .chef chef.rating matches 1.. run return run function ws:work/misc/chef/rating.down
execute if entity @s[type=player] if score .chef chef.rating matches ..9 run scoreboard players add .chef chef.rating 1
execute as @e[tag=chef.rating.display,type=text_display] run function ws:work/misc/chef/stars