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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 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
    • Confirmed
    • (Unassigned)

      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.

            Unassigned Unassigned
            ZekerMarco ZekerMarco
            Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: