Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-79793

Hitting invulnerable guardian causes thorns damage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.8.4, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w20c, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, 1.14.4, 19w46b, 1.16.2, 1.16.3, 1.16.4, 20w48a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w07a, 21w11a, 21w15a, 1.17, 1.17.1, 1.18.2, 1.19.1, 1.19.2, 1.19.4, 1.20.4
    • Confirmed
    • Mob behaviour

      The bug

      When you hit an invulnerable guardian in survival, you will still get the thorns damage, even though you didn't even deal damage to it. Punching an invulnerable mob with armor enchanted with thorns won't do that.

      How to reproduce

      1. Summon an invulnerable guardian
        /summon guardian ~ ~ ~ {Invulnerable:1b,NoAI:1b}
        
      2. Switch to Survival mode
        /gamemode survival
        
      3. Punch it

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.entity.monster.EntityGuardian.attackEntityFrom(DamageSource, float) attacks the damaging entity regardless of if the parent method successfully dealt damage.

        1. MC-79793.mp4
          3.45 MB
        2. MC-79793.png
          MC-79793.png
          1.36 MB

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            6 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: