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

Tipped arrows stuck in the ground never lose their effect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w09a
    • Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.13.1-pre1, Minecraft 1.13.1, 1.14.4, 19w37a, 20w46a, 21w03a, 21w05b, 21w06a, 21w40a, 1.20.4, 24w06a
    • Confirmed
    • (Unassigned)

      The bug

      Tipped arrows are supposed to lose their effect after they were in the ground for 30 seconds. This however only applies if the arrow has custom potion effects (CustomPotionEffects tag).

      How to reproduce

      1. Give yourself an arrow with a default potion effect
        /give @p tipped_arrow{Potion:"leaping"}
        
      2. Shoot it and wait
        It will be removed at some point but did not lose its potion effect
      3. Give yourself an arrow with a custom potion effect
        /give @p tipped_arrow{CustomPotionEffects:[{Id:1b,Amplifier:1b,Duration:1200}]}
        
      4. Shoot it and wait
        The arrow loses its potion effect after 30 seconds

      Code analysis

      Based on 1.12 decompiled using MCP 9.40 PRE 1

      The method net.minecraft.entity.projectile.EntityTippedArrow.onUpdate() only checks if the custom potion effects are not empty when trying to remove the effects, instead it should probably test if the arrow has a potion or custom potion effects.

            Unassigned Unassigned
            marcono1234 [Mod] Marcono1234
            Votes:
            7 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: