Minecraft feature:damage_sensor does not block damage from a sword with the "shape of fire" charm
1. we need an Alley mob
2. Enchant the sword with the "shape of fire"
3. Give Elle any item
4. Hit him, after which he will receive fire damage.
filter example:
"minecraft:damage_sensor": {
"triggers": [
{
"on_damage": {
"filters": {
"test": "is_family",
"subject": "other",
"value": "player"
}
},
"deals_damage": false
}
]
},
damage_sensor only checks the immediate cause of removing health. The immediate cause of the the damage that an entity takes while on fire is fire. The game does not keep track the original source of the fire, whether it was a fire block, or lava, or a fire enchantment, or projectile, or a command.
If you want the entity to be immune from fire damage there is a separate component for that, or you can add a damage sensor filter for fire damage.
See also MCPE-182675.