How to Group undead mobs in a datapack?
Solution 1:
You missed a hashtag:
execute at @s run effect give @e[distance=0.5..4,type=#undead] instant_health 1 1
You missed a hashtag:
execute at @s run effect give @e[distance=0.5..4,type=#undead] instant_health 1 1