#Entity killed detect

1 messages · Page 1 of 1 (latest)

distant gate
#

detect if entity is killed by a specific entity (detect variant) in the entity file, idk if on_death component detects the killer

dense moat
# distant gate detect if entity is killed by a specific entity (detect variant) in the entity f...

You can try this, I haven't tested it so I'm not sure if it would work:

"minecraft:damage_sensor": {
  "triggers": {
    "on_damage": {
      "filters": {
        "all_of": [
          // Detects the family of the entity that caused the damage
          { "test": "is_family", "subject": "other", "value": "monster" },
          
          // Check the variant
          { "test": "is_variant", "subject": "other", "value": 0 },
          
          // Detects if it was fatal damage
          { "test": "has_damage", "subject": "self", "value": "fatal" }
        ]
      },
      "event": "event_name"
    },
    "cause": "all",
    "deals_damage": true
  }
}
distant gate
#

like adding other filters and those filters deals damage

restive current