Mojira Archive
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.

Unresolved

ZekerMarco

2018-06-16, 02:13 AM

2021-01-07, 02:28 PM

4

1

Confirmed

(Unassigned)

CustomPotionEffects, arrow, damage

Minecraft 1.12.2 - 20w51aMinecraft 1.12.2, Minecraft 1.13-pre2, Minecraft 1.13-pre4, Minecraft 1.13-pre6, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, 1.16, 1.16.2, 20w51a

-