Uploaded image for project: 'SpigotPlugins'
  1. SpigotPlugins
  2. PLUG-375

particle effects glitch (maybe?)

XMLWordPrintable

    •  CraftBukkit version git-Spigot-21fe707-e1ebe52 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
    • My plugin
    • Yes

      I recently started making minecraft plugins and was just trying to make a beam weapon, however, the particles that i use dont fade, they just get deleted.

      and as you can see in the video, they "explode" and disperse very fast. is there any way to fix these two problems?

      this is in 1.8.8,

      and am using the ProtocolLib library for creating the particle effect.

      here is my code:

       

      new BukkitRunnable(){                                                                          double t = 0;                                                                 Location loc = p.getLocation();                                                   Vector direction = loc.getDirection().normalize();                               double x = direction.getX();                         
      double y = direction.getY();                         
      double z = direction.getZ();                                                                           public void run(){                          
      t = t + 0.5;                                                                       double x1 = x * t;                                                              double y1 = y * t;                                                                double z1 = z * t;                                                   loc.add(x1,y1,z1);                             ParticleEffect.FIREWORKS_SPARK.display(0, 0, 0, 10, 10, loc, 100);                                                                                                         if (t > Math.PI*10){                                                      this.cancel();                         
      }
      }     
      }.runTaskTimer(plugin, 0, 1);

       

            Unassigned Unassigned
            1_iq Zachary Cohen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: