# Particles
particle flame ~ ~1 ~ 0.1 0.1 0.1 .01 10 force
particle dust 0.910 0.518 0.000 1.3 ~ ~1 ~ .1 .1 .1 0.2 5 force
particle smoke ~ ~1 ~ 0.1 0.1 0.1 .01 5 force
particle flame ~ ~1 ~ 0.1 0.1 0.1 .1 1 force
particle smoke ~ ~1 ~ 0.1 0.1 0.1 .1 1 force

# Sound
execute if score @s countdown matches 0 run playsound block.fire.ambient ambient @a ~ ~ ~
execute if score @s countdown matches 0 run scoreboard players set @s countdown 15

# Push
execute as @e[tag=!unspellable,type=!player,distance=..8] at @s run tp @s ~ ~ ~ facing entity @e[tag=mini_sun,limit=1,sort=nearest,tag=obj]
execute as @e[tag=!unspellable,type=!player,distance=..8] at @s run function items:obj/mini_sun/gravity
execute as @e[tag=!unspellable,type=!player,distance=..4] run function items:obj/mini_sun/burn

tp @s ~ ~ ~ ~10 ~

# Move
function mrcd:ray_tick

# Sun dies
execute if entity @s[tag=mrcd_touch_edge] run function items:obj/mini_sun/end_of_live
execute if score @s countdown2 matches ..0 run function items:obj/mini_sun/end_of_live
