mojira.dev
MC-79793

Hitting invulnerable guardians causes thorns damage

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.

Attachments

Comments

migrated
[media][media]
Sonicwave

Does this issue still occur in snapshot 15w36d?

migrated

Ticket resolved as incomplete, because no answer in a reasonable amount of time (1+ year), if it still happens, please update the ticket.

bemoty

Can confirm for MC 1.12.1.

TheGabro

affects 20w29a

Avoma

Can confirm in 20w48a.

Avoma

Can confirm in 20w51a.

Avoma

Can confirm in 21w03a.

Avoma

Can confirm in 21w05a.

Avoma

Can confirm in 21w06a.

Avoma

Can confirm in 21w07a. Video attached.

Avoma

Can confirm in 21w11a.

Avoma

Can confirm in 21w15a.

Avoma

Can confirm in 1.17.

Avoma

Can confirm in 1.17.1.

Avoma

Can confirm in 1.18.2.

Avoma

Can confirm in 1.19.1.

Avoma

Can confirm in 1.19.2.

TheWorfer27

Can confirm in 1.19.4

marcono1234

(Unassigned)

Confirmed

Mob behaviour

guardian, invulnerable, thorns

Minecraft 1.8.4, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12.1, Minecraft 1.12.2, ..., 1.19.1, 1.19.2, 1.19.4, 1.20.4, 1.21.4

Retrieved