execute store result score tmp spinning_shard run clear @s amethyst_shard{name:spinning_shard} 0
scoreboard players operation diff spinning_shard = tmp spinning_shard
scoreboard players operation diff spinning_shard -= @s spinning_shard
scoreboard players operation @s spinning_shard = tmp spinning_shard

execute if score diff spinning_shard matches 1.. run function items:shard/spinning_shard/spawn_loop
execute if score diff spinning_shard matches ..-1 run function items:shard/spinning_shard/remove_loop
