execute positioned ~-22 ~ ~-22 as @e[dx=44,dy=32,dz=44,tag=selector,nbt={HurtTime:10s},limit=7] at @s run function game:room/6_room_completed/shop/selector
execute positioned ~-22 ~ ~-22 at @e[dx=44,dy=32,dz=44,tag=selector,limit=7] run tp @e[type=wolf,distance=..2] @e[tag=drop_mark,sort=nearest,limit=1]

# Player in (the small diff acts as a barrier detection)
execute positioned ~-22 ~ ~-22 as @e[dx=44,dy=32,dz=44,tag=shop_d,nbt=!{CustomNameVisible:1b}] run data merge entity @s {CustomNameVisible:1b}
# No player in
execute positioned ~-22.5 ~ ~-22.5 unless entity @a[tag=!dead,dx=44,dy=31,dz=44] as @e[dx=44,dy=32,dz=44,tag=shop_d,nbt={CustomNameVisible:1b}] run data merge entity @s {CustomNameVisible:0b}
