-
Bug
-
Resolution: Fixed
-
None
-
1.18.10.20 Beta, 1.17.20.20 Beta, 1.16.220, 1.16.210.54 Beta, 1.16.201 Hotfix, 1.17.2 Hotfix, 1.17.41 Hotfix
-
None
-
Confirmed
-
Windows
-
509826
The bug
When a mob has a damage_sensor component that results in magic damage being ignored, the mob also ignores magic healing. There is no way to make a mob that can heal but can't take magic damage. If you make the mob ignore all damage, this also prevents healing.
How to reproduce
1. Download the attached world
2. Hit the pig with the sword
3. Spam the pig with health potions
4. Hit the pig again
→
It dies
Behavior file
{
"format_version": "1.16.0",
"minecraft:entity": {
"description": {
"identifier": "minecraft:pig",
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false
},
"components": {
"minecraft:damage_sensor": {
"triggers": {
"cause": "magic",
"deals_damage": false
}
},
"minecraft:health": {
"value": 10,
"max": 10
},
"minecraft:physics": {}
}
}
}