execute as @e[tag=pigmerchant,type=villager,tag=merchant] at @s unless entity @n[type=piglin,distance=..2,tag=merchant_face] run function survivalplus:mobs/vanish
execute as @e[tag=skelmerchant,type=villager,tag=merchant] at @s unless entity @n[type=skeleton,distance=..2,tag=merchant_face] run function survivalplus:mobs/vanish
execute as @e[tag=straymerchant,type=villager,tag=merchant] at @s unless entity @n[type=stray,distance=..2,tag=merchant_face] run function survivalplus:mobs/vanish
execute as @e[tag=withermerchant,type=villager,tag=merchant] at @s unless entity @n[type=wither_skeleton,distance=..2,tag=merchant_face] run function survivalplus:mobs/vanish
execute as @e[tag=zombmerchant,type=villager,tag=merchant] at @s unless entity @n[type=zombie_villager,distance=..2,tag=merchant_face,tag=zombmerchant] run function survivalplus:mobs/vanish
execute as @e[tag=hmmerchant,type=villager,tag=merchant] at @s unless entity @n[type=zombie_villager,distance=..2,tag=merchant_face,tag=hmmerchant] run function survivalplus:mobs/vanish
execute as @e[tag=crystalmerchant,type=villager,tag=merchant] at @s unless entity @n[type=zombie,distance=..2,tag=merchant_face,tag=crystalmerchant] run function survivalplus:mobs/vanish