Library [1.8] ParticleEffect v1.7

Discussion in 'Resources' started by DarkBladee12, Jun 20, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    vividMario52

    I've updated it, and still no difference... only FIREWORK_SPARK works. I've tried MAGIC_CRIT, HEART, LARGE_SMOKE, and RED_DUST.
     
  2. Offline

    DarkBladee12

    vividMario52 I think you can't see them because the speed of those particles is pretty high and you can't determine it with the speed value. Try spawning more, let's say 100 for example, then you should be able to see them!
     
  3. Offline

    Likaos

    Really... great... job thanks for that !
     
  4. Offline

    Blah1

    DarkBladee12 Wow! This is very useful.
    Thanks a lot for this :)
     
  5. Offline

    DarkBladee12

    Just updated all classes so they'll work with the 1.7 Bukkit version due to the high demand. Also added the possibility to determine speed values for icon crack and block crack particles! ;)
     
    Jamboozlez likes this.
  6. Offline

    runefist

    You my friend, are THA BEST :D
     
  7. Offline

    jusjus112

    DarkBladee12
    How do i Set the Effects in the middel of an block?
    i tried:
    Code:java
    1. ParticleEffects.LAVA.display(loc, 0.0f, 0.0f, 0.0f, 1.0F, 30);
     
  8. Offline

    runefist


    I think it has to do with the location, like for on the X 0.5 is the middle and I think your location is taking 0.0
     
  9. Offline

    DarkBladee12

    jusjus112 Just do it like this:
    Code:java
    1. ParticleEffects.LAVA.display(BLOCK.getLocation().add(0.5D, 0.5D, 0.5D), 0.0f, 0.0f, 0.0f, 1.0F, 30);
     
  10. Offline

    SolaKun

    what's the BlockDust particle looks like?
     
  11. Offline

    DarkBladee12

    SolaKun BlockDust is the effect that is displayed when a player falls down at block from a greater height. It looks like a growing circle of the block particles, but if you try to display it with this lib it looks similar to the block break effect :(
     
  12. Offline

    funnyman850

    I DID IT THANK YOU SOO MUCH!
     
  13. Offline

    wilmervanheerde

    Such a nice library, I'm using it in most of my plugins. Well done!
     
  14. Offline

    valon750

    Sorry, but would it be at all possible for a few examples of use?

    ParticleEffect.LARGE_SMOKE.display(loc, 0, 0, 0, 0, 0);
    I assumed this would of worked, assuming "loc" is casted to the players current location, however it seems ineffective.
    I've only just come across this Lib, so wrapping my head around the options may take a while :)
     
  15. Offline

    DarkBladee12

    valon750 How should this work if you set the amount value to 0?
     
  16. Offline

    valon750

    DarkBladee12

    I also tried 30, taking reference from another post, yet that was also ineffective.

    It's currently 00:10, so don't blame me for not knowing what I'm going on about :p
     
  17. Offline

    jusjus112

    DarkBladee12
    Can you give me an example for how to use it for it to shoot?
    i have my code:
    Code:java
    1. @EventHandler
    2. public void onProjectileHit(ProjectileHitEvent e) {
    3. Projectile p = e.getEntity();
    4. if(!(p instanceof Fireball)) return;
    5. Fireball s = (Fireball) p;
    6. s.getLocation().getWorld().strikeLightning(s.getLocation());
    7. for(Entity en : s.getNearbyEntities(5, 30, 5)) {
    8. if(en instanceof Player) {
    9. Player pl = (Player) en;
    10. if(!(pl == e.getEntity().getShooter())) pl.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 100, 0));
    11. }
    12. }
    13. }
    14.  
    15. @EventHandler
    16. public void onPlayerInteract(final PlayerInteractEvent e) {
    17. if(!(e.getAction() == Action.RIGHT_CLICK_AIR)) return;
    18. if(!(e.getItem().getType() == Material.BLAZE_ROD)) return;
    19. Fireball s = e.getPlayer().launchProjectile(Fireball.class);
    20. s.getWorld().playEffect(e.getPlayer().getLocation(), Effect.SMOKE, 100);
    21. }

    So, how do i shoot for example an fireworkspark? can you give me an example or telling me how to do that?
     
  18. Offline

    SolaKun

    see it , Thanks!
     
  19. Offline

    DarkBladee12

    jusjus112 You probably have to call ParticleEffect.FIREWORKS_SPARK.display(...); somewhere.
     
  20. Offline

    jusjus112

    DarkBladee12
    Can you set it in my code? I have tried that before but it displays at the snowball location or the player location?
     
  21. Offline

    DarkBladee12

    jusjus112 What do you want to do exactly with it?
     
  22. Offline

    jusjus112

    DarkBladee12
    If i right click it shoot an fireball. But i will that the fireball with FireWork.spark shoot!
    Fireball with FireworkSpark!
     
  23. Offline

    DarkBladee12

    jusjus112 So you want the fireball to make a trail made out of particles?
     
  24. Offline

    jusjus112

    DarkBladee12
    yes, thats right? You can help me with it?
     
  25. Offline

    DarkBladee12

    jusjus112 You can try it with a BukkitRunnable, which plays every 2 ticks the ParticleEffect and cancels itself when the fireball is dead.
     
  26. Offline

    jusjus112

    DarkBladee12
    But how do i get the particleffects on the fireball?
     
  27. Offline

    DarkBladee12

    jusjus112 Just let the effect display on the location of the fireball!
     
  28. Offline

    darkness1999

    Code:java
    1. @SuppressWarnings("deprecation")
    2. @EventHandler
    3. public void onPlayerInteract(final PlayerInteractEvent e) {
    4. if(!(e.getAction() == Action.RIGHT_CLICK_AIR)) return;
    5. if(!(e.getItem().getType() == Material.BLAZE_ROD)) return;
    6. final Fireball s = e.getPlayer().launchProjectile(Fireball.class);
    7. s.getWorld().playEffect(e.getPlayer().getLocation(), Effect.SMOKE, 100);
    8. Bukkit.getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable() {
    9. public void run() {
    10. ParticleEffect.FIREWORKS_SPARK.display(s.getLocation(), (float) 0.2, (float) 0.2, (float) 0.2, 1, 30);
    11. }
    12. } , 2);
    13. }
     
  29. Offline

    sgavster

    You're amazing. Love this util :p
     
  30. Offline

    valon750

    Is there any possibility I could alter the colour of the LARGE_SMOKE effect?

    Altering the speeds appears to make the smoke particles spit out in all directions..
     
Thread Status:
Not open for further replies.

Share This Page