mojira.dev
MC-131430

Arrow with damage:0.0d doesn't apply its CustomPotionEffects

The bug

When a player/mob gets hit by an arrow with the damage:0.0d tag, the arrow doesn't apply its CustomPotionEffects to that player/mob.

Steps to reproduce

  1. Summon an arrow with a damage of 0.0d above an entity/player

    /summon minecraft:arrow ~ ~2.3 ~ {damage:0.0d,CustomPotionEffects:[{Id:20,Amplifier:0,Duration:20}]}

    → The arrow won't apply the minecraft:wither level 1 effect for 20 ticks.

  2. Summon an arrow with a damage of 1.0d above the entity/player

    /summon minecraft:arrow ~ ~2.3 ~ {damage:1.0d,CustomPotionEffects:[{Id:20,Amplifier:0,Duration:20}]}

    → The arrow will apply the minecraft:wither level 1 effect for 20 ticks.

Code analysis

EntityTippedArrow.arrowHit(entitylivingbase) is called from EntityArrow.onHit(raytraceresult) only if the entity is attacked.

Comments 3

Can confirm for 1.13-pre4.

Can confirm in 20w51a.

ZekerMarco

(Unassigned)

Confirmed

(Unassigned)

CustomPotionEffects, arrow, damage

Minecraft 1.12.2, Minecraft 1.13-pre2, Minecraft 1.13-pre4, Minecraft 1.13-pre6, Minecraft 1.13.1, ..., Minecraft 19w14a, Minecraft 19w14b, 1.16, 1.16.2, 20w51a

Retrieved