function olink:ch1/find_linked

# Find next pont to move
tag @e[type=#aec,tag=shadow_point,tag=ch1_olinked,limit=1] remove next_point
scoreboard players set max_age shadow_clone 0
execute as @e[type=#aec,tag=shadow_point,tag=ch1_olinked] store result score @s shadow_clone run data get entity @s Age 1
execute as @e[type=#aec,tag=shadow_point,tag=ch1_olinked] if score @s shadow_clone > max_age shadow_clone run tag @s add next_point

# Shadow main (move + particle + damage)
execute as @e[type=marker,tag=shadow,tag=ch1_olinked,limit=1] at @s run function items:passive/shadow_clone/shadow

# Place points
execute unless entity @e[type=#aec,tag=shadow_point,tag=ch1_olinked,distance=..0.8,limit=1] run function items:passive/shadow_clone/place_path_point
