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

Tipped arrows without custom potion effects don't lose effect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.13.1-pre1, Minecraft 1.13.1
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              marcono1234 [Mod] Marcono1234
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                CHK: