Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-3442

Bug with PotionEffect Creation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • None
    • Spigot ver:  1.12-pre6-SNAPSHOT

       

      With the following code...

      entity.addPotionEffect(PotionEffectType.SPEED.createEffect(100,0));
      

      the effect should last for 5 seconds, but instead, it lasts for hardly one. When this is called in an EntityDamageByEntityEvent (only place I've tested) the potion effect duration is bugged. During testing, I have found values of around 800 give 9 seconds which makes no sense as 20 ticks are in a second. 

      Now, I have worked around this by creating a PotionEffect with new PotionEffect() instead, outside the event. This works fine if I have this stored elsewhere and use it when adding a potion effect. Make sure to fix this or give documentation as people such as I can waste several amounts of time trying to debug this. 

      Thank you 

            Unassigned Unassigned
            SimplyBallistic Ryan Samarakoon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: