Mojira Archive
MCPE-114250

Mobs that are immune to magic damage also can't heal

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": {}
      }
   }
}

Fixed

[Mod] tryashtar

2021-01-10, 01:52 AM

2022-06-24, 05:45 AM

2022-06-24, 05:45 AM

9

1

Confirmed

509826

1.18.10.20 Beta - 1.17.41 Hotfix1.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

-