0

I have this in my datapack, in a JSON file:

{
  "values": [
    "minecraft:drowned",
    "minecraft:husk",
    "minecraft:phantom",
    "minecraft:skeleton",
    "minecraft:skeleton_horse",
    "minecraft:stray",
    "minecraft:wither",
    "minecraft:wither_skeleton",
    "minecraft:zoglin",
    "minecraft:zombie",
    "minecraft:zombie_horse",
    "minecraft:zombie_villager",
    "minecraft:zombified_piglin"
  ]
}

The path to the file is namespace/tags/entity_types/undead.json

But when I try this:

execute at @s run effect give @e[distance=0.5..4,type=undead] instant_health 1 1

it won't work.

Will anyone help?

1 Answer 1

1

You missed a hashtag:

execute at @s run effect give @e[distance=0.5..4,type=#undead] instant_health 1 1
1
  • 1
    If that doesn't work, it might need a namespace, like: type=#namespace:undead
    – ginkgo
    Commented Jan 5, 2022 at 21:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .