Advertisement
stormtrooper28

SteeZyyy Mineplex Particle Effect Tutorial #2 | Frost Lord

Aug 8th, 2015
1,021
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. //Typed in pastebin, may contain errors!!! (Notify me if it does)
  2. public YOUR_CLASS_NAME_GOES_HERE getInstance(){
  3.     return this;
  4. }
  5.  
  6. public static void frostLord(final Player player){
  7.     new BukkitRunnable(){
  8.         double t = 0;
  9.         double pi = Math.PI;
  10.         public void run(){
  11.             t += pi / 16;
  12.             Location loc = player.getLocation();
  13.             for(double phi = 0; phi <= 2 * pi; phi += pi / 2){
  14.                 double x = 0.3 * (4 * pi - t) * Math.cos(t + phi);
  15.                 double y = 0.2 * t;
  16.                 double z = 0.3 * (4 * pi - t) * Math.sin(t + phi);
  17.                 loc.add(x,y,z);
  18.                 ParticleEffect.SNOW_SHOVEL.display(loc,0,0,0,0,1); //customize this for your particleLib
  19.                 loc.subtract(x,y,z);
  20.            
  21.                
  22.                 if(t >= 4 * pi){
  23.                     this.cancel();
  24.                 loc.add(x,y,z);
  25.                 ParticleEffect.SNOW_SHOVEL.display(loc,0,0,0,1,50); //customize this for your particleLib
  26.                 loc.subtract(x,y,z);
  27.                 }
  28.             }
  29.         }
  30.     }.runTaskTimer(YOUR_CLASS_NAME_GOES_HERE.getInstance(), 0, 1);
  31. }
  32. //Code taken from pause at 25:43
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement