summon wolf ~ ~ ~ {Tags:["init","ghost_dog","unspellable","no_coin_drop","no_soul_drop"],Attributes:[{Name:"generic.attack_damage",Base:1}],Invulnerable:1b,Sitting:0b}

execute unless predicate olink:ch1/in_link run function olink:ch1/new_link
execute as @e[type=wolf,tag=ghost_dog,tag=init,limit=1] run function olink:ch1/join_link

data modify entity @e[type=wolf,tag=ghost_dog,tag=init,limit=1] Owner set from entity @s UUID
tag @e[type=wolf,tag=ghost_dog,tag=init] remove init
