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

Custom lingering potions & tipped arrows show incorrect duration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 16w14a, Minecraft 1.10, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w38a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 1.12, Minecraft 17w31a, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w47a, Minecraft 17w49a, Minecraft 17w49b, Minecraft 17w50a, Minecraft 18w16a, Minecraft 1.13-pre2, Minecraft 1.13, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w03b, Minecraft 19w03c, 1.14.4, 19w44a, 1.15, 1.15.1 Pre-release 1, 1.15.2, 20w07a, 20w16a, 1.16.1, 1.16.4 Pre-release 2, 1.16.4, 20w48a, 21w03a, 21w05b, 21w06a, 21w07a, 21w11a, 21w17a, 1.17, 1.17.1, 1.18.2, 22w14a, 1.19.2, 1.19.3, 1.20.1, 23w32a, 1.20.4, 1.21
    • Confirmed
    • Commands
    • Normal
    • Platform

      The bug

      When you give a player a lingering potion or tipped arrow with custom effects, it shows the duration incorrectly; for example, if we use this command:

      /give @p minecraft:tipped_arrow{custom_potion_effects:[{id:"minecraft:blindness",amplifier:0,duration:60}]} 
      

      It doesn't show 3 seconds at all. However if you were to do

      /give @p minecraft:tipped_arrow{custom_potion_effects:[{id:"minecraft:blindness",amplifier:0,duration:600}]}
      

      It shows 3 seconds

      Video: https://youtu.be/c7bxWXvj-1o

      Code analysis

      Code analysis by Marcono1234 can be found in this comment.

        1. _BugTracker_ (1.21).png
          _BugTracker_ (1.21).png
          339 kB
        2. Duration 60.png
          Duration 60.png
          321 kB
        3. Duration 600.png
          Duration 600.png
          318 kB
        4. MC-98310.mp4
          4.28 MB

            Unassigned Unassigned
            Cyclops_Gamer Logical_Cyclops
            Votes:
            53 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              CHK: