#Disable damage when using a special tag

1 messages · Page 1 of 1 (latest)

misty zenith
#

afaik, it's only possible through entity.json "minecraft:damage_sensor"

misty zenith
#

yes

lethal pike
#

is this the right file?

balmy lodge
#

You need to put it inside of the player file (if you want to disable damage for players) while preserving the player behaviour

#

It’s a behavior component, you can’t just chuck it in there. It needs to be in the components section

lethal pike
#

I crumble them but it doesn't work, that's why

misty zenith
#

#1067869022273667152 if u wana inquire more

lethal pike
lethal pike
#
{
  "format_version": "1.18.20",
  "minecraft:entity": {
    "description": {},
    "component_groups": {},
    "components": {
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "on_damage": {
              "filters": {
                "all_of": [
                  {
                    "test": "has_tag",
                    "subject": "self",
                    "value": "safe"
                  }
                ]
              }
            },
            "deals_damage": false
          }
        ]
      }
    }
  }
}