mojira.dev
MC-93892

Fire/Flame arrows and fireballs set player on fire even when blocking with shield

The bug

When shooting a player with a bow with the flame enchantment and they block it with a shield, they take no damage but are still set on fire.

Code analysis

Code analysis by @unknown in this comment.

Linked issues

Comments 8

Confirmed for 16w06a

Command to reproduce:

/summon skeleton ~ ~1 ~ {ArmorItems:[{},{},{},{id:"stone",Count:1b}],HandItems:[{id:"bow",Count:1b,tag:{ench:[{id:50s,lvl:1s}]}}]}

Can confirm for MC 1.12.1.

The following is based on a decompiled version of MC 1.12 using MC 9.40pre-1.

In the method net.minecraft.entity.projectile.EntityArrow.onHit() the hit entity is set on fire if the arrow is burning without checking if the player is blocking with a shield.

if (this.isBurning() && !(entity instanceof EntityEnderman))
{
	entity.setFire(5);
}

This can either be fixed by adding this specific check (net.minecraft.entity.projectile.EntityArrow.onHit()) or by checking if the entity which hit the player while blocking is a burning arrow, and, of course, if the player wasn't burning before (net.minecraft.entity.EntityLivingBase.attackEntityFrom()).

The contents of this bug should be updated to include Blaze fireballs, as this only became a bug in 1.13 (MC-136396) but was deemed a duplicate of this if correctly done so.

Confirmed for 1.13.2-pre1.

Still a problem in 1.14.1

Blaze bullets too! Same bug same fire without need!

Jan200101

coschevi

Confirmed

Important

(Unassigned)

Minecraft 15w49b, Minecraft 16w04a, Minecraft 16w06a, Minecraft 1.10, Minecraft 1.10.2, , Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14 Pre-Release 1, Minecraft 1.14 Pre-Release 5

Minecraft 1.14.3 Pre-Release 3

Retrieved